Sensor
sensor: - platform: ... # See supported platforms at the end of this page name: 'My Sensor' id: ram_usage icon: mdi:memory device_class: data_size state_class: measurement unit_of_measurement: '%' accuracy_decimals: 2Attributes
Section titled “Attributes”Common attributes are documented in Common Component Properties.
| Property | Description | Example |
|---|---|---|
device_class | Home Assistant device classification for the sensor value. | data_size |
state_class | Home Assistant state class (for example measurement). | measurement |
unit_of_measurement | Unit shown in user interfaces (for example %, °C, Pa). | % |
accuracy_decimals | Number of decimals reported for the sensor value. | 2 |
Triggers
Section titled “Triggers”See Triggers and Actions for how triggers work.
| Property | Description | Example |
|---|---|---|
| (none) | Sensor currently has no additional triggers. | (n/a) |
Supported filters are documented in Filters.
Supported Platforms
Section titled “Supported Platforms”Similar to ESPHome: Sensor