Commit Graph

43 Commits (22bfb99db415a6747e056df80cee3efbe3e5fa68)

Author SHA1 Message Date
epenet 278050a73f
Add type hints to integration tests (t-z) (#87707) 2023-02-08 19:10:53 +01:00
Franck Nijhof ef800335fb
Enable Ruff PT022 (#86792)
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
Franck Nijhof a79885ceaf
Enable Ruff SIM117 (#86783) 2023-01-27 11:52:49 +01:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Robert Hillis 5c5fd746fd
Add digital loggers as a Belkin supported brand (#72515) 2022-06-22 22:38:45 +02:00
Eric Severance f0b9aa7894
Bump pywemo==0.8.1 (#72400) 2022-05-24 09:53:01 +02:00
Eric Severance 92582beeff
Use properties of wemo Maker device (#72378) 2022-05-23 19:28:16 +02:00
Eric Severance e2a80e7a45
Remove unnecessary class from wemo test_fan (#72377) 2022-05-23 19:02:42 +02:00
Eric Severance cf5e21a996
Use properties of wemo Insight device (#72316) 2022-05-23 08:43:42 +02:00
epenet 75ce66e8bd
Migrate wemo light to ColorMode (#70857) 2022-05-09 18:42:18 +02:00
Erik Montnemery 5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Eric Severance c6ba987995
Use device properties for WeMo Insight sensors (#63525) 2022-03-28 17:47:18 -07:00
Eric Severance 35cf6d7a7b
Use wemo enums in fan entity (#64397) 2022-01-18 22:13:25 -10:00
Erik Montnemery 513d6cc467
Change value of device_automation constant (#64296)
* Change value of constant CONF_CHANGED_STATES

* Adjust tests
2022-01-17 16:34:40 +01:00
Eric Severance 8459a28489
WeMo state changes are seen by all coordinator entities (#64228)
* WeMo push update is seen by all coordinator entities

* Rename _wemo_exception_handler -> _wemo_call_wrapper

* Test turning off the entity

* Test setting light brightness

* Improve brightness test

* It is unnecessary to setup the platform integration

* Use domain names, not platform enum, in service calls
2022-01-17 10:03:24 +01:00
Eric Severance 7eacabf684
Share common EntityTestHelpers in wemo tests (#62455) 2022-01-05 17:22:38 -08:00
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