Skip to content

Fix issue with incorrect Notion bridge IDs#25683

Merged
MartinHjelmare merged 3 commits into
home-assistant:devfrom
bachya:notion-fix
Aug 4, 2019
Merged

Fix issue with incorrect Notion bridge IDs#25683
MartinHjelmare merged 3 commits into
home-assistant:devfrom
bachya:notion-fix

Conversation

@bachya
Copy link
Copy Markdown
Contributor

@bachya bachya commented Aug 4, 2019

Description:

A new bug popped into the Notion API: it's possible for sensors to refer to bridge IDs that don't actually exist. Currently, this throws an exception (because each entity's device_info expects this info to be valid) and prevents that sensor from loading. This PR ensures that sensors continue to load even if they refer to a nonexistent bridge.

Related issue (if applicable): fixes #25682

Pull request with documentation for home-assistant.io (if applicable): N/A

Example entry for configuration.yaml (if applicable):

notion:
  username: !secret notion_username
  password: !secret notion_password

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.
  • I have followed the development checklist

@bachya bachya added this to the 0.97.0 milestone Aug 4, 2019
@bachya bachya self-assigned this Aug 4, 2019
@probot-home-assistant probot-home-assistant Bot added integration: notion small-pr PRs with less than 30 lines. labels Aug 4, 2019
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 update _update_bridge_id?

Does the entity continue to operate without a valid bridge id? Should the entity be marked unavailable when this happens?

@bachya
Copy link
Copy Markdown
Contributor Author

bachya commented Aug 4, 2019

@MartinHjelmare:

Do we need to update _update_bridge_id?

Great call!

Does the entity continue to operate without a valid bridge id? Should the entity be marked unavailable when this happens?

The sensors will continue to work perfectly, interestingly – ran for several hours last night and everything works as expected. Makes me think this is just an API issue, not an underlying problem.

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.

Looks good!

@MartinHjelmare MartinHjelmare merged commit 3839eb0 into home-assistant:dev Aug 4, 2019
@bachya bachya deleted the notion-fix branch August 4, 2019 22:39
balloob pushed a commit that referenced this pull request Aug 5, 2019
* Fix issue with incorrect Notion bridge IDs

* Less aggressive

* Member comments
@lock lock Bot locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notion throws unhandled exception

4 participants