This is a Plasma 6 compatible widget for controlling Home Assistant entities from your KDE desktop.
- Configure Custom Entities: Add any Home Assistant entity (lights, switches, automations, etc.)
- Interactive Controls: Click to toggle entities directly from your desktop
- Visual State Feedback: Buttons show current entity state with color coding
- Flexible Layout: Configurable grid layout with 1-6 entities per row
- Smart Icons: Auto-detects appropriate icons based on entity type
- Real-time Updates: Automatically refreshes entity states at configurable intervals
- Live Entity Browser: Browse all entities directly from Home Assistant
- Search & Filter: Search by name or entity ID, filter by domain type
- Visual Entity List: See entity states, icons, and domain badges
- Auto-fill Fields: Automatically populate display names and icons
- Smart Suggestions: Recommends appropriate control types per entity
- Connection Test: Verify Home Assistant connection before browsing
- Live Preview: See exactly how your entity control will look before adding it
- Interactive Icon Picker: Browse and select icons visually from Plasma's icon collection
- Toggle Button: For lights, switches, automations
- Switch Control: Explicit on/off controls
- Light Control: Optimized for light entities
- Status Display: Read-only state display
- Button Sizes: Small, Medium, Large
- Show/Hide Labels: Toggle entity names
- Custom Icons: Override default icons per entity
- Grid Layout: 1-6 entities per row
- Update Intervals: 5-300 seconds
- Right-click the widget β "Configure"
- In the General tab:
- Enter your Home Assistant URL (e.g.,
http://homeassistant.local:8123
) - Enter your long-lived access token
- Set update interval (5-300 seconds)
- Enter your Home Assistant URL (e.g.,
-
Switch to the Entities tab
-
Configure display options:
- Entities per row: 1-6 (default: 3)
- Show entity labels: On/Off
- Button size: Small/Medium/Large
-
Browse & Add Entities (NEW!):
- Entity Browser: Click the dropdown to browse all Home Assistant entities
- Search: Type to filter entities by name or ID
- Domain Filter: Click buttons to filter by entity type (light, switch, etc.)
- Visual Selection: See entity states, icons, and current values
- Auto-fill: Selected entities automatically populate fields
- OR Manual Entry: Enter entity details manually if needed
-
Configure Entity & Preview:
- Display Name: Friendly name (auto-filled from Home Assistant)
- Control Type: Auto-suggested based on entity type
- Icon Selection:
- Manual entry in text field OR
- Browse Icons: Visual icon picker with search and categories
- Icon Preview: See current icon in real-time
- Reset: Clear custom icon to use auto-detected
- Live Preview: See exactly how the control will look with current settings
- Interactive Preview: Click the preview to test control behavior (safe mode)
- Settings Indicators: Visual indicators for labels, size, and control type
- Click Add Entity
-
Manage Entities:
- Swipe left on any entity to remove it
- View entity details and domain badges
- Duplicate entities are automatically updated
- Compact Mode: Shows badge with entity count
- Click to Expand: Opens full control panel
- Entity Controls: Click buttons to toggle entities
- Tooltips: Hover for detailed state information
Domain | Auto-Icon | Supported Actions |
---|---|---|
light.* |
π‘ Lightbulb | Toggle, Turn On/Off |
switch.* |
π Toggle Switch | Toggle, Turn On/Off |
fan.* |
πͺοΈ Windy | Toggle, Turn On/Off |
automation.* |
Toggle, Turn On/Off | |
input_boolean.* |
βοΈ Checkbox | Toggle |
climate.* |
π‘οΈ Thermometer | Status Display |
lock.* |
π Lock | Status Display |
cover.* |
πͺ Window | Status Display |
# Lights
light.living_room
light.bedroom_lamp
light.kitchen_ceiling
# Switches
switch.living_room_fan
switch.coffee_maker
switch.outdoor_lights
# Automations
automation.morning_routine
automation.security_mode
automation.bedtime_lights
# Input Booleans
input_boolean.guest_mode
input_boolean.vacation_mode
# Climate
climate.thermostat
climate.bedroom_ac
- β Qt6 Compatible: Version-less imports
- β Kirigami Integration: Proper theming and units
- β KCM Configuration: Modern config system
- β Component Updates: Replaced deprecated elements
- β API Integration: Full Home Assistant REST API support
- β State Management: Real-time entity state tracking
- β Error Handling: Robust error handling and logging
contents/
βββ config/
β βββ config.qml # Configuration categories
β βββ main.xml # Configuration schema
βββ ui/
βββ main.qml # Main widget UI with entity grid
βββ configGeneral.qml # Connection configuration
βββ configEntities.qml # Entity management UI
βββ HomeAssistantAPI.qml # API communication layer
βββ EntityControl.qml # Individual entity control component
metadata.json # Widget metadata
- Open Home Assistant
- Go to Profile β Security
- Scroll to "Long-Lived Access Tokens"
- Click "Create Token"
- Name it (e.g., "Plasma Widget")
- Copy the token (you won't see it again!)
# Test connection (replace URL and TOKEN)
curl -X GET \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
http://homeassistant.local:8123/api/
- Check Plasma version:
plasmashell --version
(must be 6+) - Verify file permissions:
ls -la ~/.local/share/plasma/plasmoids/
- Check logs:
journalctl --user -f | grep plasma
- Verify Home Assistant URL is accessible
- Test API token in browser/curl
- Check firewall settings
- Ensure Home Assistant is running
- Verify entity IDs exist in Home Assistant
- Check entity permissions (some may be read-only)
- Review Home Assistant logs for API errors
- Test entity control in Home Assistant UI first
- Use longer update intervals (60+ seconds) for better performance
- Limit entities to 6-12 for optimal responsiveness
- Use "Status Display" for read-only entities
Use any KDE icon name or file path:
lightbulb
,power-socket
,fan
weather-clear
,weather-cloudy
/path/to/custom/icon.svg
- Use descriptive names: "Living Room Lights" vs "light.living_room"
- Keep names short for better layout
- Use consistent naming conventions
- Plasma 6+: Required
- Qt 6+: Required
- KDE Frameworks 6+: Required
- Home Assistant 2023.1+: Recommended
This widget is open source. Feel free to contribute improvements:
- Enhanced entity types support
- Additional control types
- UI/UX improvements
- Performance optimizations
This repository includes GitHub Actions for automated packaging and release management. See PUBLISHING.md for details on:
- Automated KDE Store package creation
- Release management with git tags
- Local development and testing tools
- Deployment workflow documentation