Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility Meter offset defined by a time_period #20926

merged 5 commits into from Mar 6, 2019


Copy link

commented Feb 10, 2019


Breaking-change: offset is no longer an integer value dependent on the cycle, but a a very flexible time_period.

Currently offset configuration parameter is an integer that limits daily cycles to have offsets in days, monthly cycles to have offsets in months, etc.
This PR increases the flexibility of offset by making it a time_period that can be described in a combination of hours, days, months, etc. This makes it possible for a yearly cycle to start at a given day of a given month.

It causes a breaking change, but since the component is very recent (0.87) I believe users will acknowledge the improvement and fix the configuration.

Related issue (if applicable): fixes #20918

Pull request in with documentation (if applicable): home-assistant/

Example entry for configuration.yaml (if applicable):

    cycle: yearly
      days: 31  


  • 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 does not interact with devices:

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

@ghost ghost assigned dgomes Feb 10, 2019

@ghost ghost added the in progress label Feb 10, 2019

@dgomes dgomes referenced this pull request Feb 10, 2019


Change type of offset in utility_meter #8459

2 of 2 tasks complete

@dgomes dgomes force-pushed the dgomes:utility_meter_offset branch from 4d9edac to 6495d47 Feb 10, 2019

Copy link

left a comment

Looks good. Just found a typo.

Show resolved Hide resolved homeassistant/components/utility_meter/ Outdated

This comment has been minimized.

Copy link

commented Feb 24, 2019

Can be merged when conflict is solved and the breaking change is highlighted in a paragraph in the PR description.

dgomes added some commits Feb 24, 2019

@dgomes dgomes removed the in progress label Feb 24, 2019

@cgarwood cgarwood merged commit 8e9a496 into home-assistant:dev Mar 6, 2019

4 checks passed

Hound No violations found. Woof!
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls First build on utility_meter_offset at 92.728%

@ghost ghost removed the Ready for review label Mar 6, 2019

@balloob balloob referenced this pull request Mar 20, 2019


0.90.0 #22216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.