Integration Sensor¶
The integration
sensor is a helper sensor that can integrate values from other sensors over
time. This can for example be useful to integrate the values of a water flow sensor (in m^3/s) over
time (result is in m^3).
This component can be considered a more-generic version of the Total Daily Energy Sensor.
# Example configuration entry
sensor:
- platform: integration
name: "Total Daily Energy"
sensor: my_flow_meter
time_unit: min
# The sensor to integrate, can be any power sensor
- platform: pulse_counter
# ...
id: my_flow_meter
Configuration variables:¶
sensor (Required, ID): The ID of the sensor to integrate over time.
time_unit (Required, string): The time unit to integrate with, one of
ms
,s
,min
,h
ord
.integration_method (Optional, string): The integration method to use. One of
trapezoid
,left
orright
. Defaults totrapezoid
.restore (Optional, boolean): Whether to store the intermediate result on the device so that the value can be restored upon power cycle or reboot. Warning: this option can wear out your flash. Defaults to
false
.All other options from Sensor.
sensor.integration.reset
Action¶
This Action allows you to reset the value of the integration sensor to zero. For example this can be used to reset the integration sensor to zero at midnight with a time-based automation.
on_...:
- sensor.integration.reset: my_integration_sensor