* Fix google assistant request sync service call
* More descriptive services.yaml
* Update services.yaml
* Update __init__.py
* Update request sync service call timeout
Change from 5s to 15s to allow Google to respond. 5s was too short. The service would sync but the service call would time out and throw the error.
The `Config` object specific to the `google_assistant` component
had a default value for `allow_unlock`. We were not overriding this
default when constructing the Config object during `google_assistant`
component setup, whereas we do when setting up the `cloud` component.
To fix, we thread the `allow_unlock` parameter down through http setup,
and ensure that it's set correctly. Moreover, we also change the
ordering of the `Config` parameters, and remove the default. Future
refactoring should not miss it, as it is now a required parameter.
* BUGFIX: add support for extra fan speeds.
* Drop extra fan speeds.
Remove catch all, drop missing fan speeds.
* fix self.speed_synonyms call. Remove un-needed keys() call
* Add support for Mode trait in Google Assistant.
* Simplify supported logic.
* Fix SUPPORTED_MODE_SETTINGS to correct rip failures.
* more stray commas
* update tests.
* Enable Google Assistant OnOffTrait for climate devices that support them
This commit enables the OnOffTrait for climate devices that have the SUPPORT_ON_OFF feature. I have tested this locally with a Sensibo device which supports ON_OFF and a nest device that does not.
* Update trait.py
* Add tests for onoff_climate
* Add OnOff trait to climate.heatpump
* Add on status to heatpump in google_assistant tests
* Add support for locks in google assistant component
This is supported by the smarthome API, but there is no documentation
for it. This work is based on an article I found with screenshots of
documentation that was erroneously uploaded:
https://www.androidpolice.com/2018/01/17/google-assistant-home-can-now-natively-control-smart-locks-august-vivint-first-supported/
Google Assistant now supports unlocking certain locks - Nest and August
come to mind - via this API, and this commit allows Home Assistant to
do so as well.
Notably, I've added a config option `allow_unlock` that controls
whether we actually honor requests to unlock a lock via the google
assistant. It defaults to false.
Additionally, we add the functionNotSupported error, which makes a
little more sense when we're unable to execute the desired state
transition.
https://developers.google.com/actions/reference/smarthome/errors-exceptions#exception_list
* Fix linter warnings
* Ensure that certain groups are never exposed to cloud entities
For example, the group.all_locks entity - we should probably never
expose this to third party cloud integrations. It's risky.
This is not configurable, but can be extended by adding to the
cloud.const.NEVER_EXPOSED_ENTITIES array.
It's implemented in a modestly hacky fashion, because we determine
whether or not a entity should be excluded/included in several ways.
Notably, we define this array in the top level const.py, to avoid
circular import problems between the cloud/alexa components.
* Don't treat typing as an "in-between" module for import order
That was a < 3.5 era thing.
* Tighten scope of some pylint unused-import disables
To avoid isort moving a top level one around, undesirably broadening its
scope.
* Remove unit_of_measurement from climate base class.
* Updated google_assistant component and tests to use core temp units.
* Fixes
* Convert Alexa component to use core temp units for climate entities.
* Fix tests.
* Converted prometheus component.
* Remove unit_of_measurement from homekit thermostat tests.
* Small fix.
* Fix Min/Max Kelvin color temp attribute for Google
Max Kelvin is actually Min Mireds and vice-versa. K = 1000000 / mireds
* Update test_smart_home.py
* Update test_trait.py
* Accept and report both xy and RGB color for lights
* Fix demo light supported_features
* Add new XY color util functions
* Always make color changes available as xy and RGB
* Always expose color as RGB and XY
* Consolidate color supported_features
* Test fixes
* Additional test fix
* Use hue/sat as the hass core color interface
* Tests updates
* Assume MQTT RGB devices need full RGB brightness
* Convert new platforms
* More migration
* Use float for HS API
* Fix backwards conversion for KNX lights
* Adjust limitless min saturation for new scale
* Refactor Google Assistant
* Fix cloud test
* Fix supported features media player demo
* Fix query
* Fix execute
* Fix demo media player tests
* Add tests for traits
* Lint
* Lint
* Add integration tests
* Add more tests
* update logging
* Catch out of range temp errrors
* Fix cloud error
* Lint
* google_assistant: Refactor query_device
The previous code had issues where domains could break out and end up
with weird brightness values and we weren't enforcing the `on` and
`oneline` keys in the response.
* google_assistant: Add media_player to query test
* Allow exposing sensors as temperature or humidity as 'climate' to Google Assistant
* Fixed hound
* Fixed hound
* Handled correctly unit of measurement to fix humidity
* Fixed temperature conversion for Google climate components
* Fixed temperature conversion for Google climate components
* Fixed indentation
* Fixed hound
* Fixed tests
* Fixed conversion and unit tests
* Fix sync for custom unit temperature
* Implemented requested changes
* Fix hound
* Fix linting errors
* Added success tests for sensors as climate
* Fix lint errors
* Change 'on' to 'heat' as fallback thermostat mode
'on' isn't recognised as a mode by Google Assistant, rather is used as a method to return a thermostat to a previous mode. In the case where a thermostat doesn't support the standard google modes (e.g. A homematic radiator thermostat) this means the set_temperature doesn't get returned to the user on a request.
* Update test_google_assistant.py
* Changed device type of media player and cover to switch
Covers and media players should not be of device type 'light'. Example: If user requests all lights to switch to off, covers are closed and media players are affected too.
* Fix test