Skip to content

Add SCAN_INTERVAL#19186

Merged
pvizeli merged 2 commits intodevfrom
weather-interval
Dec 11, 2018
Merged

Add SCAN_INTERVAL#19186
pvizeli merged 2 commits intodevfrom
weather-interval

Conversation

@fabaff
Copy link
Copy Markdown
Member

@fabaff fabaff commented Dec 11, 2018

Description:

Use the same interval as for the sensor. It's a sensor platform and should also behave as one.

Was spotted during the review of the air_pollutants component by @MartinHjelmare.

Example entry for configuration.yaml (if applicable):

weather:
  - platform: demo

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.

@ghost ghost assigned fabaff Dec 11, 2018
@ghost ghost added the in progress label Dec 11, 2018
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Do we need to mark this breaking change, since the default scan interval will change?

@fabaff
Copy link
Copy Markdown
Member Author

fabaff commented Dec 11, 2018

Doesn't harm to add it to the release notes. I doubt that people will see an impact but better be safe than sorry.

Breaking change:
The default interval of the weather component was aligned with the sensor component and is now 30 seconds instead of 15 seconds.

@pvizeli pvizeli merged commit 3e7b908 into dev Dec 11, 2018
@ghost ghost removed the in progress label Dec 11, 2018
@delete-merged-branch delete-merged-branch bot deleted the weather-interval branch December 11, 2018 13:12

ENTITY_ID_FORMAT = DOMAIN + '.{}'

SCAN_INTERVAL = timedelta(seconds=30)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems overaggressive for a weather API.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you mean 30 minutes ?

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.

5 participants