Commit graph

64 commits

Author SHA1 Message Date
Jan Bouwhuis
e311a6835e
Add valve platform support to google_assistant (#106139)
* Add valve platform to google_assistant

* Use constant for domains set
2023-12-23 16:46:25 +01:00
Jan Bouwhuis
f5f9b89848
Add water_heater to google_assistant (#105915)
* Add water_heater to google_assistant

* Follow up comments

* Add water_heater to default exposed domains
2023-12-20 23:26:55 +01:00
Jan Bouwhuis
c5b32d6307
Add doorbell event to google_assistant (#97123)
* First attempt async_report_state_all

* Move notificationSupportedByAgent to SYNC response

* Make notificationSupportedByAgent conditional

* Add generic sync_options method

* Report event

* Add event_type as ID

* User UUID, imlement query_notifications

* Refactor query_notifications

* Add test

* MyPy

* Unreachable code

* Tweak

* Correct notification message

* Timestamp was wrong unit, it should be in seconds
* Can only allow doorbell class, since it's the only type

* Fix test

* Remove unrelated changes - improve coverage

* Additional tests

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
2023-09-25 23:20:02 +02:00
Don Holly
04e277ac95
Add AirQuality SensorState support for Google Assistant (#80579)
* Add AirQuality SensorState support for Google Assistant

* Code formatting

* Apply suggestions from code review

Co-authored-by: Joakim Plate <elupus@ecce.se>

* Update trait.py

* Update trait.py

* Fix google_assistant tests

* Update trait.py

* Simplify sensor state payload and tests

* Add more tests to fix coverage

* fix tests

* Truncate once

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Erik <erik@montnemery.com>
2023-06-28 08:55:00 +02:00
Erik Montnemery
df138d91e6
Disable google assistant local control of climate entities (#94153) 2023-06-07 13:46:17 +02:00
Barry Loong
877efc993b
Add support for window device class to google assistant (#89564) 2023-03-12 22:45:25 -04:00
Joakim Plate
3eaa1c30af
Restore fixed step fan speeds for google assistant (#76871) 2022-08-17 22:15:48 -04:00
Joakim Plate
992ceb1a09
Google Assistant diagnostics and synchronization (#73574)
* Add config flow import for local google assistant
* Add diagnostic with sync response
* Add button for device sync
2022-06-27 20:24:15 +02:00
w-marco
c075760ca0
Display Windows as TYPE_WINDOW in Google Home (#73533)
* Display Windows as TYPE_WINDOW in Google Home

* set window type to window in smart_home test
2022-06-20 13:03:43 +02:00
Loek Sangers
25fe213f22
Enable local fulfillment google assistant (#63218)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-01-05 12:09:59 -08:00
Erik Montnemery
1b44c25015
Sort google_assistant consts (#63487) 2022-01-05 17:54:29 +01:00
Erik Montnemery
75f8e031df
Add support for curtain device class to google assistant (#63380) 2022-01-05 15:01:58 +01:00
Franck Nijhof
dc47cbd01b
Add input_button support to Google Assistant (#62593) 2021-12-23 07:38:35 +01:00
epenet
3e0e2978e6
Use new DeviceClass enums in google-assistant (#61611)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-13 23:19:32 +01:00
Franck Nijhof
42ed6ddba3
Add button support to Google Assistant (#60158) 2021-11-22 20:50:21 -08:00
Matthew Garrett
dd21bf73fc
Assistant sensors (#55480) 2021-08-30 20:33:06 -07:00
Franck Nijhof
655f797f67
Add Select entity support to Google Assistant (#51997) 2021-06-18 23:30:46 +02:00
Paul Bottein
fb61ef500c
Add TV channel trait to google assistant (#49676) 2021-05-25 09:12:42 -07:00
Hmmbob
9cc406fef9
Remove deprecated CONF_ALLOW_UNLOCK, CONF_API_KEY from Google Assistant (#44087)
* Remove deprecated CONF_ALLOW_UNLOCK, CONF_API_KEY

* Use vol.Remove() to prevent setup fail

* Keep constants
2020-12-10 21:50:51 +01:00
Joakim Plate
aade4e63b8
Support asking covers to stop using google assistant (#43537) 2020-11-30 09:34:34 +01:00
edomat
50761eb4e4
Distinguish Shutters and Awnings in Google Assistant (#42782)
* Distinguish Shutters and Awnings.

* Remove trailing whitespace
2020-11-05 14:55:48 +01:00
Joakim Plate
ec6a1f9137
Add support for receiver and speaker device classes (#38381)
These are now officially supported by google
2020-09-02 11:59:51 +02:00
Joakim Plate
39e6bca682
Support Next/Previous for InputSelector (#38378)
* Support Next/Previous for InputSelector

* Update homeassistant/components/google_assistant/trait.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Adjust to match new version of _next_selected

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-06 15:58:26 +02:00
Shulyaka
06e977b444
Add humidifier support to google_assistant (#37157) 2020-06-30 14:32:23 -07:00
Brynley McDonald
47706dac1a
Implement google_assistant ModesTrait for input_select (#36313) 2020-06-01 09:40:47 -07:00
Joakim Plate
ad6e21182e
Switch default media_player device class to settop for google assistant (#36003) 2020-05-26 23:16:21 -07:00
J. Nick Koston
6f6c670b3b
Make alexa and google aware of DEVICE_CLASS_GATE (#35103) 2020-05-03 13:29:12 -07:00
springstan
ed71683488
Improve string formatting (#33643) 2020-04-04 20:17:11 +02:00
Paulus Schoutsen
4501471b8c
Google Assistant: Remove speaker type and earlier filter out devices from being locally exposed (#31830)
* Remove speaker type

* Do not expose locks or alarms to Google Local
2020-02-14 15:28:11 -08:00
Paulus Schoutsen
8ceef72853
Google Assistant: Track if request is local (#31226)
* Track if request is local

* Cancel early if 2FA disabled

* Allow disabling 2FA for ack

* Do not mark devices with 2FA as reachable

* Add request source to GA events
2020-01-28 10:54:39 -08:00
springstan
b759d50900 Move imports to top for google_assistant (#29561)
* Move imports to top for google_assistant

* Fix pylint error caused by isorting the imports with noqa: F401

* Move back an import because of circular dependency, add annotations
2019-12-08 09:45:13 +01:00
Joakim Plate
2569c4ae37 Google assistant storage of connected agents (#29158)
* Make async_report_state take agent_user_id

* Attempt to store synced agents

* Drop now not needed initialization

* Make sure cloud uses the all sync on changed preferences

* Some more places to use all version of sync

* Get the agent_user_id from the request context if available

* Minor cleanup

* Remove the old fixed agent_user_id for cloud

Instead pass along cloud_user where appropriate.

* async_delay_save takes a function

* Adjust test for delayed store

* Remove unused save function

* Add login check.
2019-12-02 22:05:59 -08:00
Shulyaka
1f72de108c google_assistant: support for humidity sensors (#28695) 2019-11-25 22:12:20 -08:00
Joakim Plate
2bd9f5680d Report state (#27759)
* 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
2019-10-18 22:37:44 -07:00
Rami Mosleh
d1adb28c6b Add google_assistant alarm_control_panel (#26249)
* 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
2019-09-25 10:13:31 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paul Bottein
976bf3e979 Add temperature sensor support to google smarthome thermostat device (#24264)
* Add temperature sensor support to google smarthome thermostat device

* fix lint for trait_test

* Reset temperature unit in tests

* Address comment
2019-06-03 12:40:15 -07:00
Joakim Plate
c8cf06b8b7 Switch media player to SWITCH type (#23914)
MEDIA device type is being rejected by google now.
2019-05-16 22:34:40 +02:00
Joakim Plate
39932d132d Add device classes for media player and map to google types (#23236)
* Add device classes for media player and map to google types

* Switch default class for media_player to media
2019-04-25 13:12:11 -07:00
Joakim Plate
62fcb1895e Device type garage for binary sensor garage_door (#23345)
* Switch binary sensor to garage for garage_door

* Add test for cover garage device type
2019-04-24 09:56:22 -07:00
Joakim Plate
7c55b9f087 Expose door cover/binary_sensor as door type (#23307)
* 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
2019-04-23 19:25:20 -07:00
Paulus Schoutsen
aa26f90420
Add sensor and binary senseor to default expose (#23332) 2019-04-23 19:19:23 -07:00
Paulus Schoutsen
0533f56fe3
Ask users for a pin when interacting with locks/garage doors (#23223)
* Ask users for a pin when interacting with locks/garage doors

* Deprecate allow_unlock option
2019-04-19 14:50:21 -07:00
Joakim Plate
4a2a130bfa Google assistant skip missing type (#23174)
* 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
2019-04-17 22:37:39 -07:00
Joakim Plate
1bfccd803f Allow switches to be represented as outlets on google assistant (#23149)
* Add device class support for switch to support outlet type

* Add a test for cover device class sync

* Drop remnant unused import
2019-04-16 17:07:14 -07:00
giefca
497038b332 Add Google Assistant garage type (#23115)
* Tests

* Add Google Assistant GARAGE type

* Update test_trait.py

* Key device class by domain

* Update smart_home.py
2019-04-15 13:05:53 -07:00
giefca
b04fd08cea Google assistant: add blinds trait for covers (#22336)
* Update const.py

* Update smart_home.py

* Update trait.py

* Update test_trait.py

* Update smart_home.py

* Update test_trait.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py

* Update __init__.py

* Update test_trait.py

* Change email

* Trying to correct CLA

* Update __init__.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update trait.py

* Update __init__.py

* Update test_trait.py

* Update test_google_assistant.py

* Update trait.py

* Update trait.py

* Update test_trait.py

* Update test_trait.py
2019-03-29 20:51:47 -07:00
Paulus Schoutsen
c68b621972
Google Assistant: Add camera stream trait (#22278)
* Add camera stream trait

* Lint
2019-03-23 09:16:43 -07:00
Paulus Schoutsen
27e8a6ee80
Rename Google Assistant evenets (#21655) 2019-03-04 13:18:16 -08:00
Penny Wood
b87eb9d79e Fire events when Google Assistant commands come in #15139 (#20204) 2019-02-27 11:33:34 -08:00