Hi everyone , i installed 3 x powr3 sonoff and made several sensor for energy management and i need help with resetting the weekly cost senors
The daily one is working correctly, but the weekly one did not reset on Monday
utility_meter.yaml
consumption_bbb_zi:
source: sensor.consumption_bbb
cron: "0 0 * * *" #pr贸ximo reset at mid-nights
consumption_bbb_saptamana:
source: sensor.consumption_bbb
cron: "0 0 1 * *" #pr贸ximo reset on Mondays: 2022-01-24 00:00:00, 2022-01-31 00:00:00
consumption_bbb_luna:
source: sensor.consumption_bbb
cron: "0 0 1 * *" #pr贸ximo reset on 1st: 2022-02-01 00:00:00, 2022-03-01 00:00:00
consumption_bbb_an:
source: sensor.consumption_bbb
cron: "0 0 1 1 *" #pr贸ximo reset on 1st Jan: 2023-01-01 00:00:00, 2024-01-01 00:00:00
sensor.yaml
sensors:
cost_zi_bbb:
friendly_name: "Cost Zi BBB"
unit_of_measurement: "Lei/kWh"
value_template: "{{ (states('sensor.consumption_bbb_zi') | float * 0.75) | round(2) }}"
availability_template: >
{{ states('sensor.consumption_bbb_zi') not in ['unknown', 'unavailable', 'none'] }}
cost_saptamana_bbb:
friendly_name: "Cost saptamana BBB"
unit_of_measurement: "Lei/kWh"
value_template: "{{ (states('sensor.consumption_bbb_saptamana') | float * 0.75) | round(2) }}"
availability_template: >
{{ states('sensor.consumption_bbb_saptamana') not in ['unknown', 'unavailable', 'none'] }}
cost_luna_bbb:
friendly_name: "Cost Luna BBB"
unit_of_measurement: "Lei/kWh"
value_template: "{{ (states('sensor.consumption_bbb_luna') | float * 0.75) | round(2) }}"
availability_template: >
{{ states('sensor.consumption_bbb_luna') not in ['unknown', 'unavailable', 'none'] }}
This is what is showing :
please help setting up the reset for weekly and monthly , thank you