ok i think I might have figured it out. I missed the “select tariff” option, so here’s what I came up with…can someone confirm if this is correct?
My assumption is that the “partialpeak” will not have any value during the weekend. Is this correct?
edit:
Didn’t seem to work. I get this error now:
Invalid config for [automation]: [tariff] is an invalid option for [automation]. Check: automation->action->0->tariff. (See /config/configuration.yaml, line 241). Please check the docs at Automation - Home Assistant
doesn’t seem to be working. I manually set the state last night to off-peak, it should now be partialpeak, but its not. I see this in the HA logs:
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
2019-02-22 07:00:00 INFO (MainThread) [homeassistant.components.automation] Executing Change Utility Tariffs on Weekdays
2019-02-22 07:00:00 INFO (MainThread) [homeassistant.helpers.script] Script Change Utility Tariffs on Weekdays: Running script
2019-02-22 07:00:00 INFO (MainThread) [homeassistant.helpers.script] Script Change Utility Tariffs on Weekdays: Executing step call service
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
2019-02-22 07:00:00 INFO (MainThread) [homeassistant.helpers.script] Script Change Utility Tariffs on Weekdays: Executing step call service
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
2019-02-22 07:00:00 INFO (MainThread) [homeassistant.helpers.script] Script Change Utility Tariffs on Weekdays: Executing step call service
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
2019-02-22 07:00:00 INFO (MainThread) [homeassistant.helpers.script] Script Change Utility Tariffs on Weekdays: Executing step call service
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
File "/usr/src/app/homeassistant/components/utility_meter/sensor.py", line 118, in async_tariff_change
2019-02-22 08:10:48 INFO (MainThread) [homeassistant.components.automation] Initialized trigger Change Utility Tariffs on Weekdays
2019-02-22 08:10:48 INFO (MainThread) [homeassistant.components.automation] Initialized trigger Change Utility Tariffs on Weekdays
2019-02-22 08:10:48 INFO (MainThread) [homeassistant.components.automation] Initialized trigger Change Utility Tariffs on Weekdays
2019-02-22 08:10:48 INFO (MainThread) [homeassistant.components.automation] Initialized trigger Change Utility Tariffs on Weekdays```
I’m a newbie on automations and conditions : can someone check my automation?
Thanks,
I’m on a 2 rates plan like this:
weekdays : 07:00:00 - 22:00:00 = peak
22:00:00 - 07:00:00 = offpeak
weekend : from Friday 22:00:00 to Monday 07:00:00 = offpeak
utility_meter:
daily_energy:
source: sensor.aeon_labs_zw095_home_energy_meter_gen5_energy
cycle: daily
tariffs:
- peak
- offpeak
monthly_energy:
source: sensor.aeon_labs_zw095_home_energy_meter_gen5_energy
cycle: monthly
tariffs:
- peak
- offpeak
automation:
alias: utility meter week
trigger:
- platform: time
at: '07:00:00'
- platform: time
at: '22:00:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
alias: utility meter weekend
trigger:
- platform: time
at: ’22:00:00'
- platform: time
at: ’07:00:00'
condition:
- condition: time
weekday:
- fri
- sat
- sun
- mon
action:
- service: utility_meter.next_tariff
entity_id: utility_meter.daily_energy
- service: utility_meter.next_tariff
entity_id: utility_meter.monthly_energy
- alias: Change Utility Tariffs to peak on Weekends
trigger:
- platform: time
at: '15:00:00'
condition:
- condition: time
weekday:
- sat
- sun
action:
- service: utility_meter.select_tariff
data:
entity_id:
- utility_meter.hourly_energy
- utility_meter.daily_energy
- utility_meter.monthly_energy
- utility_meter.yearly_energy
tariff: peak
id: 63719d7055b04372b89875c33cc78448
- alias: Change Utility Tariffs to offpeak on Weekends
trigger:
- platform: time
at: '19:00:00'
condition:
- condition: time
weekday:
- sat
- sun
action:
- service: utility_meter.select_tariff
data:
entity_id:
- utility_meter.hourly_energy
- utility_meter.daily_energy
- utility_meter.monthly_energy
- utility_meter.yearly_energy
tariff: offpeak
id: 2c7439db368f4bbe9dd88a47e39275bf
- alias: Change Utility Tariffs to partialpeak1 on Weekdays
trigger:
- platform: time
at: 07:00:00
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: utility_meter.select_tariff
data:
entity_id:
- utility_meter.hourly_energy
- utility_meter.daily_energy
- utility_meter.monthly_energy
- utility_meter.yearly_energy
tariff: partialpeak
id: d5235ec707a94edc9bf0c98704a041e4
- alias: Change Utility Tariffs to peak on Weekdays
trigger:
- platform: time
at: '14:00:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: utility_meter.select_tariff
data:
entity_id:
- utility_meter.hourly_energy
- utility_meter.daily_energy
- utility_meter.monthly_energy
- utility_meter.yearly_energy
tariff: peak
id: 3a79038f233b4facacc7c9caebd9e380
- alias: Change Utility Tariffs to partialpeak2 on Weekdays
trigger:
- platform: time
at: '21:00:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: utility_meter.select_tariff
data:
entity_id:
- utility_meter.hourly_energy
- utility_meter.daily_energy
- utility_meter.monthly_energy
- utility_meter.yearly_energy
tariff: partialpeak
id: 2a155e19ac03456c845445169f12b732
- alias: Change Utility Tariffs to offpeak on Weekdays
trigger:
- platform: time
at: '23:00:00'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: utility_meter.select_tariff
data:
entity_id:
- utility_meter.hourly_energy
- utility_meter.daily_energy
- utility_meter.monthly_energy
- utility_meter.yearly_energy
tariff: offpeak
id: 113a77a6a14b42978ce7de4bb2271def
basically what I had to do was for every period change, write a new automation. It would not work when I had it switch in the same automation. Breaking this out into like 6 different tariff changes works. I’m considering changing the trigger from time based to reading the meter’s tariff value, as my rainforest eagle sends that information (peak, partial peak, etc). Might save me one or two automation rules. I haven’t had time to get around to it though.
thanks for sharing!
Tought already I should make different automations. Just for curiousity : I live in Belgium and pay 0,30€ peak/ 1kWh and 0,25€ off-peak /1kWh. May I ask your rates?
thats pretty expensive for here in california. Where my mother lives, they pay 0,11 Euro offpeak and 0,13 Euro for peak. I’m on an Electric Vehicle plan, but because I run servers, it was cheaper ultimately to do this than it was for the other opttion was a bucket system (you get a certain number of kWh/rate bucket. my bill ended up being almost 25% higher there because servers would suck up all the lower priced buckets. Now I have TOU (Time Of Use), where it fluctuates by hour of the day.
No problem. Regarding cost, that should be easy enough to do. if you have fixed rates, just set automation for the hourly/daily/monthly rates to compute X kWh * X cost. If you’re doing it in grafana, it’s even easier.
If you’re doing it via automations, just have an automation that at like 11:59pm takes the daily usage from each rate (offpeak/peak), and then multiplies by your cost, and then store that in another metric.
Cost is also programmed and succeeded
Grafana is something I will look later on.
Now I am fighting to get the states of my light switches, these are toggle switches that I can control in HA with Curl but the states do no work