Skip to content

Comments

Guard bad supported features for Google#42163

Merged
balloob merged 1 commit intodevfrom
guard-bad-supported-features
Oct 21, 2020
Merged

Guard bad supported features for Google#42163
balloob merged 1 commit intodevfrom
guard-bad-supported-features

Conversation

@balloob
Copy link
Member

@balloob balloob commented Oct 21, 2020

Breaking change

Proposed change

Google Assistant could blow up if a bad integration inserted a string value for supported features into the state machine.

Fixes #40717

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @home-assistant/cloud, mind taking a look at this pull request as its been labeled with an integration (google_assistant) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

Copy link
Contributor

@elupus elupus left a comment

Choose a reason for hiding this comment

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

Should we block this in the base platforms instead (entity, light...)?

But should really hurt to also handle it here.

@balloob
Copy link
Member Author

balloob commented Oct 21, 2020

The goal is to get it to annoy the user enough that it will report it to us :)

@elupus
Copy link
Contributor

elupus commented Oct 21, 2020

Sure. But now we only annoy google assistant users :)

@elupus
Copy link
Contributor

elupus commented Oct 21, 2020

Ps. We could annoy them much much better by making a google home announcement of the error ;)

@balloob
Copy link
Member Author

balloob commented Oct 21, 2020

@elupus #37663 😉

@pvizeli
Copy link
Member

pvizeli commented Oct 21, 2020

We should prevent to write bad states/entity to statemachine. However, a check like that is also not bad if we have this check

@balloob
Copy link
Member Author

balloob commented Oct 21, 2020

I rather not add more checks to writing states. That will be a developer feature that would introduce runtime cost for normal usage.

@balloob balloob merged commit 5626a37 into dev Oct 21, 2020
@balloob balloob deleted the guard-bad-supported-features branch October 21, 2020 14:37
KJonline pushed a commit to Pyhass/core that referenced this pull request Oct 22, 2020
* 'dev' of github.com:home-assistant/core: (767 commits)
  [ci skip] Translation update
  Updated frontend to 20201021.1 (home-assistant#42185)
  Rewrite london_air tests in pytest style (home-assistant#41165)
  Enable co-existence of two IPMA weather entities for the same location (home-assistant#40354)
  Remove duplicated finalize_stream code in stream (home-assistant#42171)
  Bump simplisafe-python to 9.5.1 (home-assistant#42179)
  Remove coordinator success from SimpliSafe availability calculation (home-assistant#42180)
  Avoid overloading the executor with service.yaml loads (home-assistant#42172)
  Bump version to 0.118.0dev0 (home-assistant#42178)
  Add counter and timer to default_config (home-assistant#42174)
  Fix deCONZ device refresh service (home-assistant#42175)
  Update frontend to 20201021.0 (home-assistant#42173)
  Update base image to 2020.10.0 (home-assistant#42167)
  Add link to log view in persistent notification (home-assistant#42060)
  Bump Axis dependency (home-assistant#42168)
  Handle type error in hunterdouglas_powerview (home-assistant#42137)
  Add persistent_notification service to the notify platform (home-assistant#40638)
  Fix state overwrite race condition where two platforms request the same entity_id (home-assistant#42151)
  Bump python-synology to 1.0.0 (home-assistant#42161)
  Guard bad supported features for Google (home-assistant#42163)
  ...
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.

Unable to sync devices with google_assistant

5 participants