Commit Graph

27 Commits (48057e1dfb49774ce11dff2a323ecb033988b69b)

Author SHA1 Message Date
Erik Montnemery e9b746e874
Add turned on or off device trigger to toggle entity (#61089)
* Add turned on or off device trigger to toggle entity

* Renamed changed_states trigger to toggled

* Adjust tests

* Fix homekit triggers test

* Add tests

* Adjust tests after rebase

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-03 10:41:30 +01:00
Eric Severance a1be11a492
Store wemo device sw_version & upnp connections (#62758) 2021-12-24 10:31:42 -10:00
Ville Skyttä ea58432721
Use DeviceAutomationType in tests/components/[s-z]* (#62450) 2021-12-21 11:56:00 +01:00
Eric Severance 2dfd4c49da
Fix Non-thread-safe operation in wemo tests (#62418) 2021-12-20 12:56:56 -06:00
Eric Severance f50dc10276
Use the Platform enum in wemo (#62153) 2021-12-19 21:11:40 -08:00
Eric Severance e8096e7f51
Bump pywemo==0.7.0 (#62360) 2021-12-19 21:02:05 -08:00
Eric Severance 1318597370
Fix typing for wemo (#62157) 2021-12-19 18:09:30 -06:00
Eric Severance 8d6763eaad
Add wemo config_flow test to get 100% coverage (#62158) 2021-12-18 23:43:31 -06:00
Eric Severance 88a08fdf57
Wemo Insight devices need polling when off (#55348) 2021-08-31 09:32:26 +02:00
Eric Severance e6ba3b41cb
Add Binary Sensor for WeMo Insight & Maker (#55000)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-22 20:09:22 +02:00
Eric Severance 67d04b6082
Use DataUpdateCoordinator for wemo (#54866)
* Use DataUpdateCoordinator for wemo

* Rename DeviceWrapper->DeviceCoordinator and make it a subclass of DataUpdateCoordinator

* Rename async_update_data->_async_update_data to override base class

* Rename: device -> coordinator
2021-08-21 20:14:55 +02:00
Eric Severance 71b123845c
Always mock SubscriptionRegistry & DiscoveryResponder for wemo tests (#53967)
* Always mock SubscriptionRegistry & DiscoveryResponder for wemo tests

* Use autospec=True for patch
2021-08-19 07:17:16 +02:00
Eric Severance a6331d85ed
Support energy/power sensors in the WeMo component (#53419) 2021-07-26 08:50:22 -07:00
Eric Severance 61079ab7fa
Support receiving long-press events from WeMo devices (#45503)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-16 12:00:34 +02:00
CantankerousBullMoose 9316f566c9
Rescan static wemo (#49934)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-17 12:18:14 +02:00
Erik Montnemery b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() (#47655) 2021-03-09 14:25:03 +01:00
Eric Severance f05f60c4c4
Revert "Speed-up wemo discovery (#46821)" (#47392)
This reverts commit 6e52b26c06.
2021-03-04 13:07:42 -08:00
Eric Severance 6e52b26c06
Speed-up wemo discovery (#46821)
* Speed-up wemo discovery

* Use gather_with_concurrency to limit concurrent executor usage

* Comment fixup: asyncio executors -> executor threads
2021-02-20 11:16:50 -10:00
Eric Severance 2ac075bb37
Perform wemo state update quickly after a timeout (#46702)
* Perform state update quickly after a timeout

* with async_timeout.timeout(...) -> async with async_timeout.timeout(...)
2021-02-18 00:38:08 +01:00
Eric Severance eb3e5cb67f
Remove calls to wemo.reconnect_with_device (#46646) 2021-02-17 13:17:31 +01:00
Eric Severance 94131df5e0
Remove exception handling for AttributeError in wemo (#46674) 2021-02-17 00:07:22 -08:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Eric Severance d912e91e81
Periodically attempt to discover new wemo devices (#44361)
* Periodically attempt to discover new wemo devices

* Set self._stop=None after stopping the periodic discovery task

* Use the async_fire_time_changed test helper to simplify test_discovery

* Stop the pywemo registry outside of the async loop

* Add a comment describing why async_fire_time_changed is used
2020-12-24 12:25:14 +01:00
Eric Severance 2765c6f1e9
Register Wemo fan services with entity service helper (#44192)
* Use a singleton for the Wemo registry and fan services

* Undo changes to the wemo subscription registry

* Use an entity service helper to register the Wemo fan services

* Fix Wemo fan test (missing ATTR_ENTITY_ID)

* Use the function name directly rather than a string

* Improve test coverage of the set_humidity service
2020-12-15 14:19:57 +01:00
Eric Severance 69a7eff55d
Add tests for the Wemo __init__ module (#44196)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-15 09:59:23 +01:00
Eric Severance 8fe5e61cbf
Test edge cases in wemo platform code (#44136) 2020-12-12 19:41:20 +01:00
Eric Severance b4afef1395
Add tests for the wemo component (#44088)
* Add tests for the wemo component.

* Prefer mock tools from tests.async_mock over importing asynctest directly

* Avoid using `entity/entities` except when referring to an `Entity` instance in wemo tests

* Remove the overridden event_loop fixture from the wemo tests

* Patch the library code, not the integration code, in the wemo tests
2020-12-10 22:24:26 +01:00