Files
homarr/apps/docs/docs/widgets/smart-home-entity-state/index.mdx
T

63 lines
2.1 KiB
Plaintext

---
title: "Entity State"
description: "Display the state of an entity and toggle it optionally"
hide_title: true
---
import { WidgetInteractionGuide } from "@site/src/components/widgets/interactions";
import { WidgetHeader } from "@site/src/components/widgets/header";
import { AddingWidget } from "@site/src/components/widgets/adding";
import { WidgetConfig } from "@site/src/components/widgets/configuration";
import { WidgetIntegrations } from "@site/src/components/widgets/integrations";
import { smartHomeEntityStateWidget } from ".";
import { homeAssistantIntegration } from "@site/docs/integrations/home-assistant";
<WidgetHeader widget={smartHomeEntityStateWidget} categories={["Smart home"]} />
The Entity State widget shows a Home Assistant entity's state and can optionally toggle it. Advanced view includes the
entity ID, unit, device class, icon, and update timestamps; arbitrary attributes are not exposed.
### Screenshots
import sun from "./img/sun.png";
import lightSwitch from "./img/light-switch.png";
import temperature from "./img/temperature.png";
<img src={sun} alt="smart-home-entity-state sun" width={128 * 1.5} height={128 * 1.5} />
<img src={lightSwitch} alt="smart-home-entity-state light-switch" width={128 * 1.5} height={128 * 1.5} />
<img src={temperature} alt="smart-home-entity-state temperature" width={128 * 1.5} height={128 * 1.5} />
### Supported Integrations
<WidgetIntegrations
items={[
{
integration: homeAssistantIntegration,
},
]}
/>
### Interactions
- Toggle entity state by clicking on the entity (only when clickable enabled).
- If Homarr cannot refresh an entity, the last known state stays visible but toggling is disabled until the connection recovers.
<WidgetInteractionGuide />
### Adding the widget
<AddingWidget />
### Configuration
<WidgetConfig configuration={smartHomeEntityStateWidget.configuration} />
### Entity ID
Find the entity under **Home Assistant → Developer Tools → States** and copy its `domain.object_id` value.
import retrieveEntityId from "./img/retrieve-entity-id.png";
<img src={retrieveEntityId} alt="Home Assistant entity IDs under Developer Tools and States" width={256 * 2} />