Date based condition for setting electric utility tariffs?

I’m trying to create automations to set the correct tariff but wondering how to set a condition for the appropriate date range.

automation:
- alias: utility_meter_tariff_peak
  condition:
    - platform: date
      from: 5/1
      to: 10/31
  trigger:
    - platform: time
      at: '13:00:00'
  action:
    - service: utility_meter.select_tariff
      entity_id: utility_meter.daily_energy
      tariff: peak

1 Like

Hi!

I’ve got a custom component https://github.com/dgomes/home-assistant-custom-components/tree/master/electricity

if you can code your self your provider into https://github.com/dgomes/python-electricity it can easily be supported :slight_smile: