Home Assistant
Home Assistant is the leading open-source home automation platform. The Homarr integration provides real-time entity monitoring and control capabilities.Configuration
Base URL of your Home Assistant instance (e.g.,
http://homeassistant.local:8123)Long-lived access token from Home Assistant
Generating a Long-Lived Access Token
Available Features
Entity State Monitoring
Retrieve real-time state information for any Home Assistant entity.Supported Entity Types
Supported Entity Types
The integration works with all Home Assistant entities:
- Sensors: Temperature, humidity, power consumption
- Switches: Toggle smart plugs and switches
- Lights: Control brightness and colors
- Climate: Monitor thermostats and HVAC
- Locks: Check lock status
- Covers: Control blinds and garage doors
- Binary Sensors: Motion, door/window contacts
- Cameras: View camera feeds
- Media Players: Control playback
- And many more…
getEntityStateAsync(entityId)Entity State Response
Entity State Response
{ success: false, error: "..." } on failure.Automation Control
Trigger Home Assistant automations directly from Homarr.Trigger Automation
Trigger Automation
Execute any automation by entity ID:Use Cases:
- Manual trigger for scheduled automations
- Create buttons in Homarr to run scenes
- Integrate with Homarr’s own automation system
- Dashboard shortcuts for common tasks
triggerAutomationAsync(entityId)Return Value
Return Value
Returns
boolean:true: Automation triggered successfullyfalse: Failed to trigger (check logs)
Toggle Control
Toggle any compatible Home Assistant entity.Toggle Entity
Toggle Entity
Toggle lights, switches, and other controllable entities:Behavior:
- If entity is
on, it will turnoff - If entity is
off, it will turnon - Works with any entity supporting toggle service
triggerToggleAsync(entityId)Supported Entities
Supported Entities
Toggle works with:
- Lights
- Switches
- Input booleans
- Automations (enable/disable)
- Scripts
- Media players (play/pause)
- Fans
- And more…
Calendar Integration
Display Home Assistant calendar events in Homarr.Calendar Events
Calendar Events
Fetch events from all Home Assistant calendars:
- Personal calendars
- Shared family calendars
- Event calendars (sports, holidays)
- Maintenance schedules
- Trash/recycling collection
- School events
getCalendarEventsAsync(start, end)Event Properties
Event Properties
Example Configuration
Usage Examples
Smart Home Dashboard Widget
Create a custom widget displaying multiple entities:- Temperature Sensors
- Control Panel
Entity ID Format
Home Assistant entity IDs follow the format:domain.object_id
Examples:
sensor.living_room_temperature- Temperature sensorlight.bedroom_ceiling- Bedroom ceiling lightswitch.coffee_maker- Coffee maker switchautomation.morning_routine- Morning automationbinary_sensor.front_door- Front door contact sensorclimate.thermostat- Thermostat device
Authentication & Security
API Endpoints
The integration uses these Home Assistant API endpoints:GET /api/config- Test connectionGET /api/states/{entity_id}- Get entity statePOST /api/services/automation/trigger- Trigger automationPOST /api/services/homeassistant/toggle- Toggle entityGET /api/calendars- List calendarsGET /api/calendars/{entity_id}- Get calendar events
Authorization Header
All requests include:Token Security
Calendar Widget Setup
Configure Display
- Set date range (1 week, 2 weeks, month)
- Choose view mode (list, grid, timeline)
- Enable/disable event descriptions
Calendar Features
- All-Day Events: Properly formatted and displayed
- Multi-Calendar: Combines all HA calendars into one view
- Location Display: Shows event location if available
- Color Coding: Uses Home Assistant’s signature blue
- Auto-Refresh: Updates based on widget refresh interval
Troubleshooting
Connection Failed
Symptoms: “Unable to connect” or “Connection refused” Solutions:- Verify Home Assistant is running and accessible
- Check URL includes protocol (
http://orhttps://) - Ensure port is correct (default: 8123)
- Test URL in browser first
- Check firewall allows connections from Homarr
Unauthorized Error
Symptoms: “401 Unauthorized” or “Authentication failed” Solutions:- Verify token is copied correctly (no extra spaces)
- Check token hasn’t expired or been deleted
- Create a new long-lived access token
- Ensure token has necessary permissions
- Check Home Assistant logs for auth failures
Entity Not Found
Symptoms: “Entity not found” or empty response Solutions:- Verify entity ID is correct (check Developer Tools → States)
- Ensure entity exists and is enabled
- Check entity hasn’t been renamed
- Try refreshing Home Assistant configuration
Automation Not Triggering
Symptoms: Automation doesn’t run when triggered from Homarr Solutions:- Verify automation is enabled in Home Assistant
- Check automation entity ID is correct
- Review automation conditions (may be blocking trigger)
- Check Home Assistant logs for errors
- Test automation manually in HA first
Calendar Events Missing
Symptoms: Calendar widget shows no events Solutions:- Verify calendars are configured in Home Assistant
- Check date range includes events
- Ensure calendar integration is loaded in HA
- Test API endpoint directly:
/api/calendars - Review Homarr logs for parsing errors
Advanced Usage
Custom Entity Widgets
Create custom widgets that poll specific entities:Automation Integration
Use Homarr conditions to trigger HA automations:Multi-Entity Status
Monitor multiple entities and aggregate status:Supported Entity Domains
The integration supports all Home Assistant domains:| Domain | Description | Toggle Support |
|---|---|---|
sensor | Read-only sensors | ❌ |
binary_sensor | On/off sensors | ❌ |
switch | Controllable switches | ✅ |
light | Lights and bulbs | ✅ |
climate | Thermostats | ⚠️ (Limited) |
lock | Smart locks | ⚠️ (Use lock/unlock) |
cover | Blinds, garage doors | ⚠️ (Use open/close) |
fan | Fans | ✅ |
media_player | Media devices | ✅ |
automation | Automations | ✅ (Enable/disable) |
script | Scripts | ✅ |
input_boolean | Input helpers | ✅ |
scene | Scenes | ✅ |
⚠️ = Works with toggle but may have unexpected behavior. Use specific service calls instead.
Next Steps
Create Widgets
Build custom smart home dashboard widgets
Entity State Widget
Display Home Assistant entity states
Calendar Integration
View Home Assistant calendar events
Home Assistant Docs
Learn more about Home Assistant
