I setup the CircuitSetup 6-channel monitor with only two channels in use and added it via the esphome integration. No problem there; everything looking good. However, things start to get dicey when using the Utility helper and setting up the Energy Dashboard.
I’m an Ameren Missouri customer on the “Smart Savers” plan and that effectively means I’ve got 6 tariff options (Rate Options - Ameren Missouri). Is there a better to set them than this?
utility_meter:
monthly_energy:
source: sensor.6c_total_kwh
name: Monthly Energy
cycle: monthly
offset: 27
tariffs:
- summer_midpeak
- summer_offpeak
- summer_onpeak
- winter_midpeak
- winter_offpeak
- winter_onpeak
daily_energy:
source: sensor.6c_total_kwh
name: Daily Energy
cycle: daily
tariffs:
- summer_midpeak
- summer_offpeak
- summer_onpeak
- winter_midpeak
- winter_offpeak
- winter_onpeak
Then onto the Energy Dashboard. Is the best way to configure that using the 6 daily energy sensors created due to my tariff structure? Seems like there could be a better way. Perhaps just using the total_kwh
sensor but then it doesn’t show cost information. What if I want to see monthly cost? Using the monthly sensors doesn’t seem to show any cost on the dashboard.
I do have an automation to select the tariff. Throwing it below for posterity and possibly to help someone else out.
alias: "Set correct electricity costs"
trigger:
- platform: template
variables:
tariff: "winter_offpeak"
value_template: >-
{{
(now().month >= 10 or now().month <= 5) and
(
(now().hour >= 0 and now().hour <= 5) or
(now().hour >= 22 and now().hour <= 23)
) and
(now().minute == 0)
}}
- platform: template
variables:
tariff: "winter_midpeak"
value_template: >-
{{
(now().month >= 10 or now().month <= 5) and
(
(
is_state("binary_sensor.workday_sensor", "on") and
(
(now().hour >= 6 and now().hour <= 7) or
(now().hour >= 20 and now().hour <= 21)
)
) or (
is_state("binary_sensor.workday_sensor", "off") and
(now().hour >= 6 and now().hour <= 21)
)
) and
(now().minute == 0)
}}
- platform: template
variables:
tariff: "winter_onpeak"
value_template: >-
{{
(now().month >= 10 or now().month <= 5) and
(
is_state("binary_sensor.workday_sensor", "on") and
(
(now().hour >= 6 and now().hour <= 7) or
(now().hour >= 18 and now().hour <= 19)
)
) and
(now().minute == 0)
}}
- platform: template
variables:
tariff: "summer_offpeak"
value_template: >-
{{
(now().month >= 6) and
(now().month <= 9) and
(
(now().hour >= 0 and now().hour <= 5) or
(now().hour >= 22 and now().hour <= 23)
) and
(now().minute == 0)
}}
- platform: template
variables:
tariff: "summer_midpeak"
value_template: >-
{{
(now().month >= 6 and now().month <= 9) and
(
(
is_state("binary_sensor.workday_sensor", "on") and
(
(now().hour >= 6 and now().hour <= 14) or
(now().hour >= 19 and now().hour <= 21)
)
) or (
is_state("binary_sensor.workday_sensor", "off") and
(now().hour >= 6 and now().hour <= 21)
)
) and
(now().minute == 0)
}}
- platform: template
variables:
tariff: "summer_onpeak"
value_template: >-
{{
(now().month >= 6 and now().month <= 9) and
(now().hour >= 15) and
(now().hour <= 18) and
(now().minute == 0) and
is_state("binary_sensor.workday_sensor", "on")
}}
action:
- service: select.select_option
target:
entity_id: select.daily_energy
data:
option: "{{ tariff }}"
- service: select.select_option
target:
entity_id: select.monthly_energy
data:
option: "{{ tariff }}"