#Helper - current period bill
1 messages · Page 1 of 1 (latest)
I already have a number helper with the cost per kWh and another utility meter helper calculating the kWh for the current period
I am doing the following:
{% set energy_current_period = states('sensor.energy_consumed_current_period') | float(0.0) %}
{% set current_period_rate = states('input_number.electricity_tariff_current_period') | float(0.0) %}
{% set meter_cost = 12 %}
{% set bill_current_period = ((energy_current_period * current_period_rate) + meter_cost) | float(0.0) | round(2) %}
{{ bill_current_period }}
How can I get the helper to reset every 2 months like the utility meter helper?
how are you 'resetting' the utility meter helper?
Because its a calculation of the current period which is 2 months
So every 2 months it starts again from 0
no, like .. are you using an automation to reset the value? or is it just resetting because the timeframe is only 2mo
No not via automation, the utility meter itself in UI has the option to reset every number of day/months etc
ahh
I dont know that you can 'reset' it offhand. I think the only way would be to see if you could get the start date, then use a filter on the template to be after that date
so when the meter resets, your data would only be from that date
I think HA handles it quite nicely. It submits the value to history when it resets every time