home-assistant.io/source/developers/component_states.markdown
Alok Saboo 1aca7b08cf Misc fixes: e.g. -> e.g., and proper case for Home Assistant (#4942)
* e.g. to e.g., and proper case for Home Assistant

* Instructions how to -> Instructions on how to
2018-03-17 20:20:37 +01:00

983 B

layout title description date sidebar comments sharing footer
page Handling states Instructions on how to handle states with your component. 2016-07-01 20:00 true false true true

It is the responsibility of the component to maintain the states of the devices in your domain. Each device should be a single state and, if possible, a group should be provided that tracks the combined state of the devices.

A state can have several attributes that will help the frontend in displaying your state:

  • friendly_name: this name will be used as the name of the device
  • entity_picture: this picture will be shown instead of the domain icon
  • unit_of_measurement: this will be appended to the state in the interface
  • hidden: This is a suggestion to the frontend on if the state should be hidden

These attributes are defined in homeassistant.helpers.entity.