home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.78k stars 7.2k forks source link

Tariffs not working #28835

Open dbpage opened 1 year ago

dbpage commented 1 year ago

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

home-assistant[bot] commented 1 year ago

Hey there @dgomes, mind taking a look at this feedback as it has been labeled with an integration (utility_meter) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `utility_meter` can trigger bot actions by commenting: - `@home-assistant close` Closes the feedback. - `@home-assistant rename Awesome new title` Renames the feedback. - `@home-assistant reopen` Reopen the feedback. - `@home-assistant unassign utility_meter` Removes the current integration label and assignees on the feedback, add the integration domain after the command.
dgomes commented 1 year ago

This is not a support forum, please use https://community.home-assistant.io

Format your code and provide logs

dbpage commented 1 year ago

Thanks for your response.  I am suggesting there is an issue with documentation.  The tariff example doesn't work, and there are inconsistencies between the config and automations. -------- Original message --------From: Diogo Gomes @.> Date: 9/8/23 5:23 AM (GMT-05:00) To: "home-assistant/home-assistant.io" @.> Cc: Dennis Page @.>, Author @.> Subject: Re: [home-assistant/home-assistant.io] Tariffs not working (Issue #28835) This is not a support forum, please use https://community.home-assistant.io Format your code and provide logs

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

dgomes commented 1 year ago

In the automation "tariff" is a variable, you could just call it "abc" it would work the same.

Use "Traces" tool in the automation editor to diagnose your automation and check what is going on, also check home assistant logs

github-actions[bot] commented 10 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved. If this issue is still relevant, please let us know by leaving a comment 👍 This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

dbpage commented 10 months ago

I have implemented Tariffs exactly as documented and it still doesn't work. No issues are reported in Traces; the variable changes to Peak and Offpeak as designed. System logs report the following:

Logger: homeassistant.helpers.service Source: helpers/service.py:243 First occurred: November 6, 2023 at 3:00:00 PM (4 occurrences) Last logged: November 6, 2023 at 7:00:00 PM

Referenced entities select.daily_energy, select.hourly_energy, select.monthly_energy are missing or not currently available Referenced entities select.hourly_energy are missing or not currently available Referenced entities select.daily_energy are missing or not currently available Referenced entities select.monthly_energy are missing or not currently available