Commit Graph

28 Commits

Author SHA1 Message Date
epenet 9f688a564f
Add type hints to integration tests (part 4) (#87848) 2023-02-11 08:26:13 +01:00
epenet 3052de3e8e
Add type hints to integration tests (d-e) (#87699) 2023-02-08 13:01:44 +01:00
Robert Svensson 8eae572c93
Mark type "On/Off Switch" as a deCONZ switch entity (#70598)
Convert entity types of light platform to switch platform
2022-04-25 08:25:38 +02:00
Robert Svensson bf7c2753d5
deCONZ use siren platform (#56397)
* Add siren.py

* Working siren platform with 100% test coverage

* Also add test file...

* Add test to verify that switch platform cleans up legacy entities now that sirens are their own platform

* Update homeassistant/components/deconz/siren.py

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-09-18 21:59:04 +02:00
Robert Svensson ad5dbebc03
Use websocket fixture in deCONZ switch tests (#47831)
Localize test data
Improve asserts
2021-03-18 11:44:52 +01:00
Robert Svensson 20f45f8ab9
Improve deCONZ tests by using aioclient_mock rather than patching web requests (#45927)
* Don't patch web requests, use aioclient_mock instead

* Remove stale prints

* Remove tests for old way of loading platforms

* Remove unused imports
2021-02-09 08:31:29 +01:00
Paulus Schoutsen 9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Robert Svensson 7eb532ddd0
Improve imports in deCONZ tests (#41976)
* Improve imports in deconz tests

* Add spacing
2020-10-17 11:20:06 -05:00
Robert Svensson cbb4324c84
Refactor deCONZ tests (#41362)
* Use hass.config_entries.async_unload

* Return config_entry from setup_deconz_integration
2020-10-06 23:25:57 +02:00
Robert Svensson 552856203b
Clean deCONZ tests to depend less on integration code (#41015) 2020-10-02 11:20:33 +02:00
Robert Svensson 66a8edb11e
deCONZ fix comments from #40265 (#40640)
* Use set not list

* Events are not entities

* Don't await unload_events

* Remove checks of entities content in tests

* List to set comprehension

* Why is it so hard to remember that sets arent parenthesis...
2020-09-27 11:02:45 +02:00
Robert Svensson 203c556ba3
Improve tracking of existing entities in deconz (#40265)
* Store all entities in dict

* Use stored unique id to select if to create entity or not

* Remove unnecessary init

* Change so same physical sensor doesnt try to create multiple battery sensors
Change so groups get created properly

* Add controls in tests that entities are logged correctly
2020-09-25 22:49:28 +02:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Robert Svensson 883b8f21ce
deCONZ - Library cleanup (#31410)
* Follow library changes

* Bump dependency to v70

* Fix test
2020-02-02 19:07:20 +01:00
Robert Svensson b373c202c9
deCONZ - Add support for new switch type (#31362) 2020-02-01 17:08:49 +01:00
Paulus Schoutsen 9aa02e35a7
Entity Component to no longer generate automatic groups (#23789) 2020-01-07 17:30:53 +01:00
Robert Svensson ec61342ec3
deCONZ - Improve tests based on Martins feedback in Axis integration (#30438) 2020-01-03 18:11:04 +01:00
Bas Nijholt 41cd678f00 Sort imports according to PEP8 for deconz (#29659) 2019-12-09 12:25:35 +01:00
Robert Svensson 57a3f7d5c8
Pass in parameters explicitly to DeconzSession (#29617)
Dont pass in loop to DeconzSession
Services will use new refresh state method
2019-12-08 16:53:34 +01:00
Robert Svensson f5d12669a5 deCONZ improve gateway tests (#26709)
* Improve gateway tests

* Harmonize all tests to use the same gateway initialization method

* Improve scene tests

* Add gateway resync call to platform tests

* Forgot to change switch tests to use common gateway method

* Improve event tests
2019-09-19 14:44:09 -07:00
Robert Svensson 8a39924b37
deCONZ improve light tests (#26697)
* Improve light tests
* Small improvements on light and group classes
2019-09-18 12:47:26 +02:00
Robert Svensson 518d2c31bb deCONZ - use entity registry disabled_by to control available entities (#26219)
* First draft

* Support enabling disabled entities

* Clean up

* Move import

* Local entity enabled replaced during rebase

* Add option flow test

* Mark options properties with option
2019-09-05 16:38:00 -07:00
Robert Svensson a2589f56e1 Add system options to config entries (#25926)
* Add system options to config entries

* For feedback

* Follow most of balloobs comments

* Fix balloobs comments

* Improvements

* Fix second round of Balloobs comments

* Fix third round

* Add system options to mock config entry

* Fix integration tests

* Fix the last failing tests

* Fix disabled string

* Fix failing disabled_by tests

* New tests

* Config entry WS API tests

* Fix comments
2019-08-17 21:34:11 -07:00
Paulus Schoutsen 6f357cb23e First pass fixing tests that raise exceptions caught by asyncio.gather (#25860)
* First pass fixing tests that raise exceptions caught by asyncio.gather

* Fix demo test

* lint
2019-08-12 16:42:12 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Robert Svensson b50afec5f1 Support multiple deCONZ gateways (#22449)
* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Add support for services to specify bridgeid
2019-04-04 17:48:24 -07:00
Robert Svensson a3f0d55737
Change deCONZ to embedded platforms (#20113)
Move all platforms into components/deconz
2019-01-15 19:29:56 +01:00