Automation for switching electricity tariffs does not work (- peak - offpeak - night)
In manual mode “select.select_option” everything switches and does not work in automatic mode . This is error : “Error: Option is not valid for entity select.daily_energy, valid options are: peak, offpeak, night”
counter_electric:
utility_meter:
daily_energy:
source: sensor.0xa4c138ef167976c6_energy_2
name: Daily Energy
cycle: daily
tariffs:
- peak
- offpeak
- night
monthly_energy:
source: sensor.0xa4c138ef167976c6_energy_2
name: Monthly Energy
cycle: monthly
tariffs:
- peak
- offpeak
- night
automation:
- id: вибір тарифу єлектрики
alias: вибір тариф
initial_state: true
triggers:
- trigger: time
at: "08:00:00"
- trigger: time
at: "20:00:00"
variables:
tariff: "peak"
- trigger: time
at: "07:00:00"
- trigger: time
at: "11:00:00"
- trigger: time
at: "22:00:00"
variables:
tariff: "offpeak"
- trigger: time
at: "23:00:00"
variables:
tariff: "night"
actions:
- action: select.select_option
target:
entity_id: select.daily_energy
data:
option: "{{ tariff }}"
- action: select.select_option
target:
entity_id: select.monthly_energy
data:
option: "{{ tariff }}"