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

BOM Weather throttle fix #14234

Merged

Conversation

nickw444
Copy link
Contributor

@nickw444 nickw444 commented May 1, 2018

Description:

Some throttling code appears to be duplicated between both the function body BOMCurrentData.update (using this._last_update) as well as by the @Throttle decorator. This PR removes the in-function throttling and extends the duration used by @Throttle to 35 minutes.

Also rename rest to bom_data

This change was suggested by @OttoWinter in #14042 (comment)

Example entry for configuration.yaml (if applicable):

weather:
  - platform: bom
    station: IDN60901.94767
sensor:
  - platform: bom
    station: IDN60901.94767
    name: Sydney
    monitored_conditions:
      - apparent_t
      - cloud
      - cloud_base_m
      - cloud_oktas
      - cloud_type_id
      - cloud_type
      - delta_t
      - 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

Checklist:

  • The code change is tested and works locally. - Tested using tests in Fix BOM weather '-' value #14042
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

Copy link
Member

@OttoWinter OttoWinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@Danielhiversen Danielhiversen merged commit 5ade84d into home-assistant:dev May 5, 2018
@balloob balloob mentioned this pull request May 11, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed integration: bom small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants