My electrical utility provider has time-of-use pricing that changes based on the season. I am trying to write an automation to capture this, but cannot get it to work. Would anyone be able to offer some guidance?
- trigger:
- platform: time
at: '07:00:00'
condition:
condition: state
entity_id: 'binary_sensor.workday_sensor'
state: 'on'
action:
- service: >
utility_meter.select_tariff
data:
entity_id: utility_meter.daily_energy
{% set month = now().month %}
{% if month >= 5 and month <= 10 %}
tariff: midpeak
{% else %}
tariff: onpeak
{% endif %}