Sensor: add state (#34793)

* Sensor: add state

* Update source/_integrations/sensor.markdown

Co-authored-by: Marcel van der Veldt <marcel.vanderveldt@nabucasa.com>

* Add description on unavailable and unkown, streamline formatting

---------

Co-authored-by: Marcel van der Veldt <marcel.vanderveldt@nabucasa.com>
This commit is contained in:
c0ffeeca7 2024-09-19 05:46:43 +02:00 committed by GitHub
parent 42eb974099
commit b58522c149
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -20,6 +20,20 @@ Sensors are a basic integration in Home Assistant. They monitor the states and c
Some of these sensors are built-in to Home Assistant, some are created automatically when you add an integration (see this [list](/integrations/#sensor)), and some can be created manually. The [Statistics](/integrations/statistics) and [Template](/integrations/template) sensors are two examples of the last case.
## The state of a sensor entity
The state of a sensor entity is its currently detected value, which can be either text or a number.
<p class='img'>
<img src='/images/integrations/sensor/state_sensor.png' alt='Screenshot showing the state of a sensor entity in the developer tools' />
Screenshot showing the state of a sensor entity in the developer tools.
</p>
In addition, the entity can have the following states:
- **Unavailable**: The entity is currently unavailable.
- **Unknown**: The state is not yet known.
## Device class
{% include integrations/device_class_intro.md %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB