developers.home-assistant/docs/entity_sensor.md
Tommi Pääkkö 3263d563e0 Update unit_of_measurement Unit in temperature (#160)
It reads in Homekit component code that the unit_of_measurement should be °C/°F. This updates the docs to match that. 

ref: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/homekit/type_sensors.py#L52
2019-01-04 19:43:55 +01:00

30 lines
1.0 KiB
Markdown

---
title: Sensor Entity
sidebar_label: Sensor
---
A sensor is a read-only entity that provides some information. Information has a value and optionally, a unit of measurement.
## Properties
> Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data.
| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| state | string | **Required** | The value of the sensor.
| unit_of_measurement | string | `None` | The unit of measurement that the sensor is expressed in.
| device_class | string | `None` | Type of sensor.
### Available device classes
If specifying a device class, your sensor entity will need to also return the correct unit of measurement.
| Type | Unit | Description
| ---- | ---- | -----------
| battery | % | % of battery that is left.
| humidity | % | % of humidity in the air.
| illuminance | lx/lm | Light level.
| temperature | °C/°F | Temperature.
| timestamp | ISO8601 | Timestamp
| pressure | hPa,mbar | Pressure.