Skip to content

Clear device state attributes if update from feed fails for geo_rss_events sensor#17249

Merged
balloob merged 1 commit intohome-assistant:devfrom
exxamalte:geo-rss-events-sensors-fix-for-not-removing-state-attributes
Oct 8, 2018
Merged

Clear device state attributes if update from feed fails for geo_rss_events sensor#17249
balloob merged 1 commit intohome-assistant:devfrom
exxamalte:geo-rss-events-sensors-fix-for-not-removing-state-attributes

Conversation

@exxamalte
Copy link
Copy Markdown
Contributor

@exxamalte exxamalte commented Oct 8, 2018

Description:

In the case where a feed becomes unavailable, the state is set to 0 (same as before the refactoring in version 0.80), but the device state attributes are not cleared.
This change will fix this and clear the device state attributes if the update from the external feed fails. A test case has been amended to test this behaviour.

Related issue (if applicable): n/a

Pull request in home-assistant.io with documentation (if applicable): n/a

Example entry for configuration.yaml (if applicable): n/a

Checklist:

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

If the code does not interact with devices:

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

@balloob balloob merged commit b637b48 into home-assistant:dev Oct 8, 2018
@ghost ghost removed the in progress label Oct 8, 2018
@exxamalte exxamalte deleted the geo-rss-events-sensors-fix-for-not-removing-state-attributes branch October 8, 2018 14:25
@balloob balloob mentioned this pull request Oct 26, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants