Commit graph

36 commits

Author SHA1 Message Date
Erik Montnemery
443463e19d
Emulate color_temp for lights which support color or white ()
* Emulate color_temp for lights which support color or white

* Support legacy lights

* Tidy up group.light code

* Improve color_temp to white conversion

* Remove color_temp to white conversion

* Add test

* Tweak deconz test
2021-06-09 11:23:01 +02:00
Erik Montnemery
154c849eac
Filter unsupported parameters from light service calls ()
* Filter unsupported parameters from light service calls

* Silence pylint

* Fix deconz tests

* Fix mqtt tests

* Fix scene tests

* Fix trådfri emulated CT

* Fix mqtt tests
2021-05-26 08:02:59 +02:00
Robert Svensson
3f2d3bd1b2
Use websocket fixture in deCONZ light tests ()
Localize test data
Improve asserts#
2021-03-18 11:01:32 +01:00
Robert Svensson
20f45f8ab9
Improve deCONZ tests by using aioclient_mock rather than patching web requests ()
* 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 ()
* 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
Robert Svensson
22a6e55e70
Base deCONZ group supported features on the sum of all its lights () 2021-01-22 23:39:34 +01:00
Robert Svensson
18c7ae9a8b
Fix hs_color crashing when activating scenes in deCONZ on color_temp lights () 2021-01-22 22:40:22 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Robert Svensson
e2ef9d1afc
Some lights only support hs, like the lidl christmas lights () 2020-12-09 19:02:44 +01:00
Robert Svensson
55cbd5aa0d
Track deCONZ lib changes to light based devices ()
* Improve control of covers

* Log backtrace if available

* Do not create entity for controller tool
Binary sensor should use state rather than is_tripped
Add some more tests to lights and sensors

* Bump dependency to v74

* Fix Balloobs comments
2020-11-23 11:37:11 +01:00
Robert Svensson
7eb532ddd0
Improve imports in deCONZ tests ()
* Improve imports in deconz tests

* Add spacing
2020-10-17 11:20:06 -05:00
Robert Svensson
cbb4324c84
Refactor deCONZ tests ()
* 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 () 2020-10-02 11:20:33 +02:00
Robert Svensson
66a8edb11e
deCONZ fix comments from ()
* 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 ()
* 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
Robert Svensson
ceeea52915
Improve handling of mireds being far out of spec () 2020-09-13 16:31:39 +02:00
Robert Svensson
a6e9a312a3
deCONZ - Don't send off signals to light if already off () 2020-06-02 00:20:52 +02:00
Robert Svensson
07469127ce
deCONZ - Add support for max/min mireds ()
* Add support for max/min mireds reported per light from deconz .77

* Bump dependency
2020-06-01 23:48:18 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 () 2020-04-30 13:29:50 -07:00
Robert Svensson
b5df2ba853
deCONZ - Directly reflect changes to config entry options ()
* Directly reflect changes to config entry options

* Remove print

* Add tests

* Add title to config options
2020-02-18 13:24:25 -08:00
Robert Svensson
883b8f21ce
deCONZ - Library cleanup ()
* 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 () 2020-02-01 17:08:49 +01:00
Paulus Schoutsen
9aa02e35a7
Entity Component to no longer generate automatic groups () 2020-01-07 17:30:53 +01:00
Robert Svensson
ec61342ec3
deCONZ - Improve tests based on Martins feedback in Axis integration () 2020-01-03 18:11:04 +01:00
Bas Nijholt
41cd678f00 Sort imports according to PEP8 for deconz () 2019-12-09 12:25:35 +01:00
Robert Svensson
57a3f7d5c8
Pass in parameters explicitly to DeconzSession ()
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 ()
* 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 ()
* 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 ()
* 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 ()
* 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 ()
* First pass fixing tests that raise exceptions caught by asyncio.gather

* Fix demo test

* lint
2019-08-12 16:42:12 +02:00
Nikolay Vasilchuk
8b6ddc22a5 Fix deconz allow_clip_sensor and allow_deconz_groups options () 2019-08-09 19:31:58 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Robert Svensson
b50afec5f1 Support multiple deCONZ gateways ()
* 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
9ce8f4737d
deCONZ thermostat support ()
* Add support for thermostats in deCONZ by adding Climate platform
2019-02-18 17:43:22 +01:00
Robert Svensson
a3f0d55737
Change deCONZ to embedded platforms ()
Move all platforms into components/deconz
2019-01-15 19:29:56 +01:00
Renamed from tests/components/light/test_deconz.py (Browse further)