Skip to content

Tariffs not working #28835

@dbpage

Description

@dbpage

Feedback

The YAML and automation "Advanced Configuration" examples don't work for me. I'm not sure the documentation is accurate. The first thing I notice is that the YAML has "tariffs" and the automation has "tariff." Utility_meter does not accept "tariff;" it only accepts "tariffs." I changed the automation to "tariffs," but it still doesn't work. The simple YAML works fine without the tariffs.

I added the following to configuration (tailored to my source):

utility_meter:
  daily_energy:
    source: sensor.current_energy_usage
    name: Daily Energy
    cycle: daily
    tariffs:
      - peak
      - offpeak
  monthly_energy:
    source: sensor.current_energy_usage
    name: Monthly Energy
    cycle: monthly
    tariffs:
      - peak
      - offpeak

I added the following to automations:

trigger:
    - platform: time
      at: "09:00:00"
      variables:
        tariffs: "peak"
    - platform: time
      at: "21:00:00"
      variables:
        tariffs: "offpeak"
  action:
    - service: select.select_option
      target:
        entity_id: select.daily_energy
      data:
        option: "{{ tariffs }}"
    - service: select.select_option
      target:
        entity_id: select.monthly_energy
      data:
        option: "{{ tariffs }}"

URL

https://www.home-assistant.io/integrations/utility_meter/

Version

2023.9.0

Additional information

No response

Metadata

Metadata

Assignees

Labels

integration: utility_meterstaleThe PR had no activity for quite some time, and is marked as Stale

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions