Hey friends,
Can you please help me how to customize a daily utility meter that is only counting between a specific time (for example from 3pm to 4pm)? So I will get easily a quick overview of the last days.
Hey friends,
Can you please help me how to customize a daily utility meter that is only counting between a specific time (for example from 3pm to 4pm)? So I will get easily a quick overview of the last days.
The easiest way to do this is with tariffs. Each tariff creates it’s own sensor and you switch between which tariff is accumulating using an automation.
e.g.
utility_meter:
daily_energy:
source: sensor.energy
name: Daily Energy
cycle: daily
tariffs:
- afternnon_3_to_4pm
- other_times
automation:
trigger:
- platform: time
at: "15:00:00"
variables:
tariff: "afternnon_3_to_4pm"
- platform: time
at: "16:00:00"
variables:
tariff: "other_times"
action:
- service: select.select_option
target:
entity_id: select.daily_energy
data:
option: "{{ tariff }}"
You can see the afternoon daily totals in sensor.daily_energy_afternnon_3_to_4pm
You can ignore sensor.daily_energy_other_times
See the utility meter advanced configuration section here: https://www.home-assistant.io/integrations/utility_meter/#advanced-configuration