trend platform allows you to create sensors which show the trend of numeric
state_attributes from other entities. This sensor requires two updates of the underlying sensor to establish a trend. Thus it can take some time to show an accurate state. It can be useful as part of automations, where you want to base an action on a trend.
To enable Trend binary sensors in your installation, add the following to your
# Example configuration.yaml entry binary_sensor: - platform: trend sensors: solar_angle: entity_id: sun.sun
- sensors array (Required): List of your sensors.
- friendly_name (Optional): Name to use in the Frontend.
- sensor_class (Optional): The type/class of the sensor to set the icon in the frontend.
- entity_id (Required): The entity that this sensor tracks.
- attribute (Optional): The attribute of the entity that this sensor tracks. If no attribute is specified then the sensor will track the state.
- invert (Optional): Invert the result (so
truemeans decending rather than ascending)
In this section you find some real life examples of how to use this sensor.
This example indicates
true if the temperture is rising:
binary_sensor: - platform: trend sensors: temperature_up: friendly_name: 'Temp increasing' entity_id: sensor.skylight_temperature sensor_class: heat
And this one indicates
true if the temperture is falling:
binary_sensor: - platform: trend sensors: temperature_down: friendly_name: 'Temp decreasing' entity_id: sensor.skylight_temperature sensor_class: cold invert: Yes