But have recently moved to a day/night tariff where I pay one price for kwh from 9am-12am, and another price between 12am-9am.
How do I setup the utility meter to track both tariffs?
I know I can do this:
That’s because you just copied the example without changing the tariff select that your utility meter uses.
action:
- service: select.select_option
target:
entity_id: select.daily_energy # This is not your tariff select entity id.
data:
option: '{{ tariff }}'
- service: select.select_option # You don't even have or need this one.
target:
entity_id: select.monthly_energy
data:
option: '{{ tariff }}'
I have the monthly one too, I just didn’t paste in here, same as the daily one but with monthly cycle.
But I still don’t follow I have select.daily_energy and monthly entitiy ids which are called the same?
If you run the automation manually there will be no trigger, and therefore no variable to select which tariff to use.
trigger:
- platform: time
at: 09:00:00
variables:
tariff: peak # only set at 9am, not with a manual trigger
- platform: time
at: 00:00:00
variables:
tariff: offpeak # only set at midnight, not with a manual trigger
.
.
.
- service: select.select_option
target:
entity_id: select.daily_energy
data:
option: '{{ tariff }}' # so this is not defined when run manually.
Yup that was it @tom_l , values are working now with one exception, it doesn’t seem to let me add the off peak value to the energy dashboard, it’s simply not on the list while the peak one is and can be selected, but I can’t see a difference between them?
Hello guys, there is my config of 2 automations in case if someone will need.
I got a sensor sensor.energy_meter with 2 parameters sensor.energy_meter_day and sensor.energy_meter_night As result automation config for first period looks like below. You can make different automations for different periods as many as you need.
alias: 2 zone energy tariff Day
description: ""
trigger:
- platform: time
at: "07:00:00"
condition: []
action:
- service: select.select_option
data:
option: Day
target:
entity_id: select.energy_meter
mode: single