Skip to content

Fix #22648 - Utility_meter would try to cancel a non existing task#22669

Merged
pvizeli merged 2 commits intohome-assistant:devfrom
dgomes:triple_tariff
Apr 3, 2019
Merged

Fix #22648 - Utility_meter would try to cancel a non existing task#22669
pvizeli merged 2 commits intohome-assistant:devfrom
dgomes:triple_tariff

Conversation

@dgomes
Copy link
Copy Markdown
Contributor

@dgomes dgomes commented Apr 2, 2019

Description:

This is a bug fix for utility_meters with more than 2 tariffs.

Related issue (if applicable): fixes #22648

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

utility_meter:
  sonoff_1000384783_daily_energy_consumption:
    source: sensor.sonoff_1000384783_energy
    cycle: daily
    tariffs:
      - onpeak
      - midpeak
      - offpeak

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@ghost ghost assigned dgomes Apr 2, 2019
@ghost ghost added the in progress label Apr 2, 2019
@dgomes dgomes changed the title Fix #22648 Fix #22648 - Utility_meter would try to cancel a non existing task Apr 2, 2019
@dgomes dgomes removed the in progress label Apr 2, 2019
@pvizeli pvizeli added this to the 0.91.0 milestone Apr 3, 2019
@pvizeli pvizeli merged commit 7c5846a into home-assistant:dev Apr 3, 2019
balloob pushed a commit that referenced this pull request Apr 3, 2019
…22669)

* don't cancel tariff that are paused

* test tariffs
@balloob balloob mentioned this pull request Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors showing up on utility_meter.select_tariff automations

4 participants