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

Reverse out change #14234 BOM Weather throttle fix #17468

merged 6 commits into from Oct 30, 2018


None yet
5 participants

nickw444 commented Oct 15, 2018

Re-raising #16660 (comment) with feedback changes


On May 1, 2018, OttoWinter suggested a change in #14042 (comment) that then became #14234

@nickw444 made the change in PR #14234 to throttle every 35 minutes but this causes the time the sensor is read to be decoupled from the time of the actual reading becoming available in the JSON file.

6:45 HA started, BOM sensor started, sensor waits 35 mins
7:20 BOM sensor gets 7:00 reading, waits 35 mins <-- this one is 15 minutes after reading was in JSON (7:05)
7:55 BOM sensor gets 7:30 reading, waits 35 mins <-- this one is 20 minutes late
8:30 BOM sensor gets 8:00 reading, waits 35 mins <-- this one is 25 minutes late
9:05 BOM sensor gets 8:30 reading, waits 35 mins <-- this one is 30 minutes late
9:40 BOM sensor gets 9:30 reading, waits 35 mins <-- back on track time-wise, if a little late

The readings get more and more 'late' until they flick over back to being reasonable then creep out again. The original logic kept it locked to the last reading time + 35 mins which is when we'd expect a new reading in or soon after.

This change takes the latest code base and puts back the previous logic that kept the sensor readings in sync with the new data coming in.

It also tidies a comment by removing the word iterating where it had been used twice.

Related issue (if applicable): reverts #14234

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

Example entry for configuration.yaml (if applicable):

  - platform: bom
    station: IDN60901.94767
  - platform: bom
    station: IDN60901.94767
    name: Sydney
      - apparent_t
      - cloud
      - cloud_base_m
      - cloud_oktas
      - cloud_type_id
      - cloud_type
      - delta_t
      - local_date_time
      - local_date_time_full
      - gust_kmh
      - gust_kt
      - air_temp
      - dewpt
      - press
      - press_qnh
      - press_msl
      - press_tend
      - rain_trace
      - rel_hum
      - sea_state
      - swell_dir_worded
      - swell_height
      - swell_period
      - vis_km
      - weather
      - wind_dir
      - wind_spd_kmh
      - wind_spd_kt


  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

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/
  • 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.

Pteranodon and others added some commits Sep 17, 2018

Reverse out change #14234 BOM Weather throttle fix
Reverted back to original throttle code to ensure sensors are updated on time.
@@ -17,13 +17,13 @@
import requests
import voluptuous as vol

import homeassistant.helpers.config_validation as cv

This comment has been minimized.


nickw444 Oct 15, 2018


IntellJ import ordering? 🤷‍♂️

nickw444 added some commits Oct 15, 2018


This comment has been minimized.


nickw444 commented Oct 26, 2018

Hey @balloob just checking in to make sure this PR hasn't gotten lost amongst everything else. It is ready for review. Thanks!

@balloob balloob merged commit 71b5636 into home-assistant:dev Oct 30, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.005%) to 93.55%

@wafflebot wafflebot bot removed the in progress label Oct 30, 2018


This comment has been minimized.


nickw444 commented Oct 30, 2018

Thanks @balloob and an additional thanks for all the hard work you put in to making this project as awesome as it is 🙂👌

@balloob balloob referenced this pull request Nov 9, 2018


0.82 #18335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment