Home Assistant - Helper
In the world of home automation, Home Assistant offers impressive flexibility in the integration and management of sensors. possible sensors can be added not only via the configuration.yaml file, but also conveniently via a helper in the GUI.
Add Riemann Sum Integral Sensor (formerly Platform:Integration)
A useful tool for calculating the cumulative consumption from instantaneous values is the Riemann sum integral sensor. This sensor adds up consumption values, such as watts, to determine the total consumption in watt hours (Wh). Particular care must be taken when selecting the method of the sum integral sensor, as the choice between the trapezoidal rule and the "left" method can lead to different results.
The consumption is totalized:
Riemann Sum Integral Sensor Change method: trapezoidal vs. left
In addition, the "Platform Integration" as "utility_meter" enables the allocation of the totalized consumption to specific time periods. These can be graded as required, hourly or daily, in order to obtain a detailed consumption overview. If the "trapezoidal rule" is used as the method for the Riemann totalizing integral sensor, a spike can cause the energy meter to count too much:
Unfortunately, there is no option in the graphical user interface to change the method of the sum integral sensor. A change is only possible directly in the configuration via an editor:
changed to "left"
To relate the totalized consumption to a specific time period again, the "Platform Integration" can be used as "utility_meter":
Add consumption meter (formerly Utility_Meter)
The utility meter uses the total consumption and divides it into specific time periods: e.g. hourly or daily:
Statistics Platform
Another interesting feature is the use of the Statistics Platform to analyze historical consumption data. The Statistics Platform can be used to represent certain historical values, for example the sum of certain values.
or via the configuration.yaml file
sensor:
- name: rain_weather_24
platform: statistics
entity_id: sensor.rain_weather
state_characteristic: sum
max_age:
hours: 24
sum_differences uses the differences between the values in a continuous counter:
or via the configuration.yaml file
sensor:
- name: powerplug_24
platform: statistics
entity_id: sensor.powerplug_summation_delivered
state_characteristic: sum_differences
max_age:
hours: 24
Another example is the average temperature of the last 24 hours
or via the configuration.yaml file
sensor:
- name: aussen_temperature_24
platform: statistics
entity_id: sensor.aussen_temperature
state_characteristic: mean
max_age:
hours: 24
{{percentage}} % positive