Franck Nijhof
d320c73fb7
Use async_write_ha_state in tests ( #91333 )
2023-04-13 12:36:36 +02:00
Barry Loong
877efc993b
Add support for window device class to google assistant ( #89564 )
2023-03-12 22:45:25 -04:00
epenet
d65dff3f9e
Adjust entity registry access in tests (2) ( #88960 )
2023-03-01 16:23:36 +01:00
Frédéric Guardia
85f2693353
Fix Google Assistant temperature attribute ( #85921 )
2023-03-01 12:54:07 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ( #88165 )
...
* Enable Ruff PT006
* Adjust existing cases
* Fix tests
* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
1e352b60df
Add type hints to integration tests (part 11) ( #87996 )
2023-02-13 14:22:49 +01:00
epenet
89e4ee5320
Add type hints to integration tests (part 8) ( #87982 )
2023-02-13 11:13:48 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ( #87792 )
...
* Move EntityCategory to homeassistant.const
* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
330e1c6cbb
Clean up unnecessary registry mocks from integration tests ( #87763 )
2023-02-09 10:43:45 +01:00
epenet
7a4d15a657
Add type hints to integration tests (f-g) ( #87700 )
2023-02-08 13:33:52 +01:00
epenet
4142f0d15d
Add return type to tests without arguments ( #87613 )
...
* Add return type to tests without arguments
* Black
* Cancel fixture amends
2023-02-07 14:20:06 +01:00
epenet
aa00114c2f
Add return type to async tests without arguments ( #87612 )
2023-02-07 10:26:56 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 ( #87347 )
2023-02-03 23:08:48 +01:00
epenet
a79be493e5
Adjust hass_client type hint in integration tests ( #86954 )
...
* Adjust hass_client type hint in integration tests
* Adjust hass_client_no_auth
* Fix rebase
2023-02-02 16:29:57 -05:00
Franck Nijhof
fca3382d37
Migrates tests to use MediaPlayerEntityFeature enum ( #86779 )
2023-01-27 10:56:40 +01:00
Franck Nijhof
e4a78420b8
Enable Ruff PT013 ( #86757 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-27 09:09:46 +01:00
epenet
30bf0634fe
Add per-file-ignore to pylint ( #86289 )
2023-01-22 17:26:24 +01:00
Franck Nijhof
79b52a2b41
Stricter pylint message control ( #86154 )
2023-01-20 13:47:55 +01:00
Michael
e5f67c9119
Replace the usage of unit constants by enumerations in Tests [f-g] ( #85933 )
2023-01-15 14:46:45 +01:00
Franck Nijhof
1f0ea73463
Add support for entity aliases to Google Assistant ( #84405 )
2022-12-21 23:52:01 +01:00
Joakim Plate
c576a68d33
Upgrade pytest-aiohttp ( #82475 )
...
* Upgrade pytest-aiohttp
* Make sure executors, tasks and timers are closed
Some test will trigger warnings on garbage collect, these warnings
spills over into next test.
Some test trigger tasks that raise errors on shutdown, these spill
over into next test.
This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.
Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309
* Replace loop with event_loop
* Make sure time is frozen for tests
* Make sure the ConditionType is not async
/home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
def wrapper(*args, **kwargs):
Enable tracemalloc to get traceback where the object was allocated.
See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.
* Increase litejet press tests with a factor 10
The times are simulated anyway, and we can't stop the normal
event from occuring.
* Use async handlers for aiohttp
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
/Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
warnings.warn(
* Switch to freezegun in modbus tests
The tests allowed clock to tick in between steps
* Make sure skybell object are fully mocked
Old tests would trigger attempts to post to could services:
```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```
* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
Paulus Schoutsen
d39ed0cde4
Remove unused custom data in Google Assistant ( #79003 )
2022-09-23 13:03:28 -04:00
epenet
f453726b18
Cleanup HVACAction and HVACMode in tests ( #78813 )
2022-09-20 20:30:54 +02:00
Franck Nijhof
774d5138ca
Update PyJWT to 2.5.0 ( #78776 )
2022-09-20 20:17:49 +02:00
epenet
41d2ac3943
Cleanup MediaClass and MediaType in tests ( #78817 )
...
Cleanup MediaClass/MediaType in tests
2022-09-20 17:55:13 +02:00
Joakim Plate
924bffc7d0
Add query data to google assistant diagnostic ( #78828 )
2022-09-20 17:05:10 +02:00
Joakim Plate
bd0daf68e0
If brightness is not available, don't set a value ( #78827 )
2022-09-20 07:57:54 -04:00
epenet
7ffac12de7
Adjust root-import in google-assistant tests ( #78768 )
2022-09-19 15:40:56 +02:00
epenet
fd05d949cc
Fix device_class in demo ( #78463 )
...
Use _attr_device_class in demo
2022-09-14 20:09:31 +03:00
Erik Montnemery
1bc8770b51
Remove area_id from entity_registry.async_get_or_create ( #77700 )
...
* Remove area_id from entity_registry.async_get_or_create
* Adjust tests
* Fix lying comment in test
2022-09-02 13:31:05 +02:00
Jan Bouwhuis
448b720eb7
Fix trait processing Fan state without percentage_step ( #77351 )
...
* Fix trait processing Fan without percentage_step
* Update homeassistant/components/google_assistant/trait.py
Co-authored-by: Joakim Plate <elupus@ecce.se>
* Fix test
* Fix formatting
Co-authored-by: Joakim Plate <elupus@ecce.se>
2022-08-27 17:17:02 +02: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
Paulus Schoutsen
57efa9569c
Cache is_supported for Google entities ( #73936 )
2022-06-24 17:05:36 -04: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
jack5mikemotown
b91a1c1b0a
Fix Google Assistant brightness calculation ( #72514 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-05-26 13:01:23 -07:00
Paulus Schoutsen
3cd398a5bd
Warn for old Google SDK version ( #72403 )
2022-05-24 10:26:25 +02:00
J. Nick Koston
24d7a464e1
Refactor logbook to reduce overhead and complexity ( #71509 )
2022-05-08 21:47:26 -07:00
Erik Montnemery
1aaf78ef99
Remove entity category system in favor of hidden_by ( #68550 )
2022-05-02 09:33:16 -07:00
J. Nick Koston
fe6a4bfb1d
Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC ( #69643 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-09 09:05:54 -10:00
Paulus Schoutsen
130ca2213f
Enforce EntityCategory enum ( #69015 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-31 15:04:33 -07:00
Erik Montnemery
dc0c3a4d2d
Exclude hidden entities from google_assistant ( #68554 )
2022-03-23 12:46:53 +01:00
J. Nick Koston
723dcbafca
Complete fan speed transition from #59781 ( #67743 )
2022-03-09 10:38:12 +01:00
Paulus Schoutsen
fb4de7211b
Make Google sync_seralize a callback ( #67155 )
2022-02-24 08:36:36 -08:00
Paulus Schoutsen
cd5b69d02e
Add Google local indicator ( #66610 )
2022-02-16 07:54:59 -08:00
Paulus Schoutsen
bc41028800
Some tweaks to the demo ( #65623 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-02-04 09:49:47 +01:00
Paulus Schoutsen
cf6b3fc810
Add support for proxy-selected intent ( #65094 )
2022-01-28 08:16:28 -08:00
Erik Montnemery
07563f4fd2
Disable google_assistant local SDK if SSL is enabled ( #64983 )
2022-01-26 18:55:30 +01:00
Franck Nijhof
3f7275a9c7
Give scenes last activated state ( #62673 )
2022-01-07 19:02:32 +01: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
75f8e031df
Add support for curtain device class to google assistant ( #63380 )
2022-01-05 15:01:58 +01:00
ryborg
5f5adffd5b
Fix CO/CO2 sensors mixup in Google Assistant ( #63152 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-01-04 18:24:44 +01:00
Franck Nijhof
dc47cbd01b
Add input_button support to Google Assistant ( #62593 )
2021-12-23 07:38:35 +01:00
Dave T
569d5644ab
Use DeviceClass Enums in google_assistant tests ( #62142 )
2021-12-16 22:50:46 -08:00
Erik Montnemery
814a742518
Don't wait for Google Assistant service calls when reporting state ( #59832 )
...
* Don't wait for Google Assistant service calls when reporting state
* Update tests
* Add test
2021-11-29 18:34:38 +01:00
Franck Nijhof
42ed6ddba3
Add button support to Google Assistant ( #60158 )
2021-11-22 20:50:21 -08:00
Erik Montnemery
d18c250acf
Add minor version support to storage.Store ( #59882 )
2021-11-18 17:15:40 +01:00
Bram Kragten
47b6755177
Google Cast: Use own media player app ( #55524 )
2021-11-10 19:40:49 +01:00
Erik Montnemery
a0a8b9db26
Add entity category 'system' ( #58595 )
...
* Add entity category 'hidden'
* Update cloud
* Update Google assistant
* Update Alexa
* Fix tests
* Add ENTITY_CATEGORIES constant
* Rename ENTITY_CATEGORY_HIDDEN to ENTITY_CATEGORY_SYSTEM
* Correct import in motioneye
2021-10-28 14:36:41 +02:00
Ville Skyttä
b52c5c82b1
Use http.HTTPStatus in components/[gh]* ( #58246 )
2021-10-23 20:34:53 +02:00
Erik Montnemery
8b33aa3702
Don't expose config or diagnostic entities to Google Assistant ( #57669 )
2021-10-15 09:12:34 -07:00
Erik Montnemery
d494b3539d
Prevent 3rd party lib from opening sockets in google_assistant tests ( #56346 )
2021-09-21 11:27:10 -07:00
Erik Montnemery
d5b6dc4f26
Use hass_client_no_auth test fixture in integrations a-g ( #55581 )
2021-09-02 14:49:20 +02:00
Matthew Garrett
dd21bf73fc
Assistant sensors ( #55480 )
2021-08-30 20:33:06 -07:00
J. Nick Koston
e6e8d7eded
Convert color temperature to visible color in lights ( #55219 )
2021-08-25 21:56:36 +02:00
Giuseppe Iannello
ec3bfcea46
Support for EnergyStorageTrait for vacuum cleaners ( #55134 )
2021-08-25 10:12:31 -07:00
Giuseppe Iannello
4d7de0fd4c
Add support for Google Assistant's LocatorTrait for vacuum cleaners ( #55015 )
...
* Support for LocatorTrait for vacuum cleaners
* Handle Locator request with `silence: True`
* Update homeassistant/components/google_assistant/trait.py
Co-authored-by: Joakim Plate <elupus@ecce.se>
* Black
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-23 20:16:50 -07:00
Joakim Plate
8a7cb389ed
Drop support for fan speeds and support reverse ( #53105 )
2021-07-20 22:07:15 -07:00
J. Nick Koston
5d85983b09
Update google assistant locks to support locking, unlocking, jammed ( #52820 )
2021-07-20 23:49:05 -05:00
J. Nick Koston
9b705ad6df
Update lock entity to support locking, unlocking, jammed ( #51455 )
2021-07-20 18:12:56 +02:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes ( #52987 )
2021-07-19 10:46:09 +02:00
Franck Nijhof
655f797f67
Add Select entity support to Google Assistant ( #51997 )
2021-06-18 23:30:46 +02:00
Erik Montnemery
3db21b407a
Add support for color_mode white to demo light ( #51575 )
...
* Add support for color_mode white to demo light
* Fix unique_id for newly added light
* Update tests
2021-06-07 20:26:25 +02:00
Jan Bouwhuis
2222a121f4
Add support for fan speed percentage and preset modes to google_assistant integration ( #50283 )
...
* support relative fan speeds
* fan preset modes
* improve tests
* Revert relative speed code report zero percentage
2021-06-02 22:09:22 +02:00
Paul Bottein
fb61ef500c
Add TV channel trait to google assistant ( #49676 )
2021-05-25 09:12:42 -07:00
Erik Montnemery
bf57c77d5c
Add color_mode to demo light ( #49694 )
...
* Update demo light with color mode support
* Add rgbw and rgbww color properties
* Update demo light
* Tweak
* Remove unneeded _clear_colors
2021-04-29 10:45:17 +02:00
Paulus Schoutsen
a6d87b7fae
Batch Google Report State ( #49511 )
...
* Batch Google Report State
* Fix batching
2021-04-23 10:56:23 -07:00
Paulus Schoutsen
7e7267f822
Send only a single event per incoming Google command ( #49449 )
2021-04-20 09:21:52 -07:00
Chris Browet
591d09c177
Use google assistant TemperatureControl trait to report sensor ( #46491 )
...
* CHG: use TemperatureControl trait to report sensor
* fixup: blacked
* fixup: flaked
* fixup: flaked
* Adjust tests
* fixup test and rebase
* test coverage
2021-04-19 11:41:30 +02:00
Erik Montnemery
1a5068f71d
Use supported_color_modes in google_assistant ( #49176 )
...
* Use supported_color_modes in google_assistant
* Fix tests
2021-04-14 09:18:22 +02:00
Paulus Schoutsen
05aeff5591
Describe Google Assistant events ( #49141 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-13 09:31:01 -07:00
Dan Klaffenbach
5174f63fd8
Add definitions for grouping media players ( #41193 )
...
* Add definitions for grouping media players
See https://github.com/home-assistant/architecture/issues/364
* Fix Google Assistant tests
* Define sync versions of async_join_players/async_unjoin
* Don't use async API in synchronous test methods
* Fix tests and make pylint happy
The method name `unjoin` is used by another component, so let's use
`unjoin_player` instead.
* Fix emulated_hue tests
The new media player entity in the `demo` component requires a tiny
adjustment in the emulated_hue tests.
* Use "target:" in service description
* Also use "name:" in service descriptions
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-03-18 18:19:28 +01:00
Tobias Haber
f785cc7d9a
Google has deprecated a comma separated list for modes changed it to array ( #48029 )
2021-03-17 20:59:06 -07:00
tkdrob
ab53b49d3f
Clean up constants ( #46948 )
...
* Clean up constants
* clean up humidifier constants
* fix tests
* fix prometheus tests
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-02 12:52:00 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ( #47248 )
...
* Unused pylint suppression cleanups
* Remove outdated pylint bug references
* Add flake8-noqa config and note to run it every now and then
* Add codes to noqa's
* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Paulus Schoutsen
7c2545af6e
Use async_capture_events to avoid running in executor ( #47111 )
2021-02-26 13:28:52 -08:00
Joakim Plate
0bfcd5e1ee
Use explicit open/close for covers ( #46602 )
2021-02-16 10:26:38 +01:00
Paulus Schoutsen
538df17a28
Restore Google/Alexa extra significant change checks ( #46335 )
2021-02-10 16:30:29 +01:00
J. Nick Koston
d417ee2732
Add fan speed percentage support to google assistant ( #45835 )
2021-02-02 14:39:07 +01:00
J. Nick Koston
068d1b5eb8
Separate fan speeds into percentages and presets modes ( #45407 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: John Carr <john.carr@unrouted.co.uk>
2021-01-27 17:44:36 -06:00
Dror Eiger
74efe78d0a
Add device metadata for Google Assistant ( #45507 )
...
* Add device metadata for Google Assistant
* Increase test coverage
* Refactor fetching the device and entity entries.
2021-01-26 21:59:43 +01:00
Paulus Schoutsen
712a5a098d
Add significant change filtering to Google ( #45566 )
2021-01-26 21:45:09 +01:00
Mick Vleeshouwer
9b14586568
Add DemoCover with only tilt controls ( #45228 )
...
* Add DemoCover with only tilt controls
* Add default tilt position to Pergola Roof
* Apply githooks (isort)
* Add new demo device to Google Assistant fixtures
2021-01-20 19:11:55 -06:00
Joakim Plate
3de0610909
Support google assistant stopping for assumed state covers ( #44266 )
...
* Support stopping for assumed state covers
* Adjust black formatting
2021-01-02 23:01:20 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +01:00
Joakim Plate
56b3e0b52e
Support area on entities for google assistant ( #44300 )
...
* Support area on entities
* Don't let registry area override config
2020-12-21 21:55:06 +01:00
Joakim Plate
aade4e63b8
Support asking covers to stop using google assistant ( #43537 )
2020-11-30 09:34:34 +01:00
Joakim Plate
e98f36e357
Support openRelativePercent for google assistant covers ( #43336 )
2020-11-20 15:20:09 +01:00
Joakim Plate
1567fadda3
Improve Google Assistant cover assumed state handling ( #43255 )
...
* Set command only cover
* No need for override position now that we support command only
* Return empty state response for assumed state
Fixes #43178
Reverts: #23498
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-17 21:55:46 +01:00
Paulus Schoutsen
5626a379de
Guard bad supported features for Google ( #42163 )
2020-10-21 16:37:42 +02:00