Hi all,
In The Netherlands there is a support from the government regarding energy prices. For that there is a limitation to those prices until a certain level (kWh’s for electricity and m3’s for gas). I implemented a few template sensors in my configuration.yaml to track how much of this level we have consumed. These template sensors are now every minute/second when electricity or gas is used/returned. For me it is ok to have them fired once each hour or even once a day, as it is creating irrelevant logging and therefore lets my db grow.
Until now I could not figure out a way to change the update interval. Any suggestions?
As you can see below I use more sensors. It is the one after the remmed comment “Prijsplafond energie stroom”.
Thanks a lot!
# SENSOREN NIET-MQTT
# ODROID temperatuur
sensor:
- platform: command_line
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
# If errors occur, make sure configuration file is encoded as UTF-8
unit_of_measurement: "°C"
value_template: "{{ value | multiply(0.001) | round(1) }}"
# Prijsplafond energie stroom
- platform: template
sensors:
resterend_stroomverbruik_in_het_plafond:
friendly_name: 'Resterend stroomverbruik in het plafond'
device_class: energy
unit_of_measurement: kWh
# state_class: total
value_template: >
{{ 2746 | float(default = 0) -((states('sensor.verbruik_laag') | float(default = 0) + 72 - states('sensor.retour_laag') | float(default = 0)) - 3 + (states('sensor.verbruik_hoog') | float(default = 0) + 81.9 - states('sensor.retour_hoog') | float(default = 0))) - 5 | round(2, default=0) }}
#correctie van 154 kWh per 12-1-2023 voor later starten met meten