* Add report state config
* Add initial steps for local report state
* Use owner of system as user_id
* First working prototype
* Only report state if requested
* Add some good logging and adjust constant name
* Move jwt generation out to non member
* Move cache out to caller
* Remove todo about cache
* Move getting token out of class
* Add timeout on calls
* Validate config dependency
* Support using service key to do sync call when api_key is not set
* Make sure timezone is fixed for datetime dummy
* Use exact expire_in time
* Support renewing token on 401
* Test retry on 401
* No need to declare dummy key twice
* Correct some docs on functions
* Add test for token expiry
* add alarm_control_panel to google_assistant
* add cancel arming option
* raise error if requested state is same as current
* rework executing command logic
* Add tests
* fixed tests
* fixed level synonyms
* Extract exposed devices function
* Add might_2fa info to trait
* Do not filter with should_expose in Google helper func
* Cloud: allow setting if Google entity is exposed
* Allow disabling 2FA via config
* Cloud: allow disabling 2FA
* Lint
* More changes
* Fix typing
* Add action.devices.traits.Volume
* Drop media player from brightness trait
* Factor out commands into separate functions
* Drop support for explicit mute
* Expose door cover/binary_sensor as door type
More logical to ask "What doors are open" than "What sensors are open"
* Add test for binary_sensor device_classes
* Cosmetic flake8
* Add test for device class for cover
* Skip entity if no device type found
* Add test for potentially skipped binary sensors
* Reorg code, add tests to ensure all exposed things have types
* Lint
* Fix tests
* Lint
* Corrections and test
* Raise error if does not support setting position
* Raising error for stateless and assumed state covers
* Fix pylint
* Tests
* Update test_trait.py
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.
* 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.
* 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
* Fixed aliases warning message
* Fixed test cases
* Changing handling for google_assistant groups to treat them as lights - amending to include user info.
* Enable brightness, RGB, etc for groups in Google Assistant
* Revert color/hue/temp settings
* Change servce from light to homeassistant
* Fixed config_units
* Convert from light to switch
* Change group to switch
* Update tests to switch instead of light for group
* add support for color temperature and color; also add some extra deviceInfo attributes
* change so that default behaviour doesn't turn off device if the action isn't handled
* add tests
* fix lint
* more lint
* use attributes were applicable
* removed debug logging
* fix unassigned if only None returned
* report more data in QUERY
* better tests for color and temperature
* fixes after dev merge
* remove deviceInfo as not part of a device state (PR #10399)
* fix after merge
* Initial commit for request_sync functionality
* Fixes for Tox results
* Fixed all tox issues and tested locally with GA
* Review comments - api_key, conditional read descriptions
* Add test for service
* http: Add headers key to json[_message]
* Add google_assistant component
This component provides API endpoints for the Actions on Google Smart
Home API to interact with Google Assistant.
* google_assistant: Re-add fan support
* google_assistant: Fix Scene handling
- The way I originally wrote the MAPPING_COMPONENT and the way it's actual
used changed so the comment was updated to match that.
- Use const's in more places
- Handle the ActivateScene command correctly
* google_assistant: Fix flakey compare test
Was failing on 3.4.2 and 3.5, this is more correct anyway.
* google_assistant: Use volume attr for media_player