Add fan support to deCONZ (#40806)

* Add fan support to deconz

* Fix gateway test

* Fix lint issue

* Apply suggestions from code review

* Fix black

* Improve tests

* Store previously used speed in case turn_on service is called without a speed attribute

* Fix tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
Robert SvenssonandPaulus Schoutsen authored and GitHub committed 2020-10-13 12:57:42 +02:00
1 parent 113a680c43
commit 72289b8171
4 files changed
+315 -5

No files matched your search

+6 -5
View File
@@ -90,11 +90,12 @@ async def test_gateway_setup(hass):
assert forward_entry_setup.mock_calls[0][1] == (config_entry, "binary_sensor")
assert forward_entry_setup.mock_calls[1][1] == (config_entry, "climate")
assert forward_entry_setup.mock_calls[2][1] == (config_entry, "cover")
assert forward_entry_setup.mock_calls[3][1] == (config_entry, "light")
assert forward_entry_setup.mock_calls[4][1] == (config_entry, "lock")
assert forward_entry_setup.mock_calls[5][1] == (config_entry, "scene")
assert forward_entry_setup.mock_calls[6][1] == (config_entry, "sensor")
assert forward_entry_setup.mock_calls[7][1] == (config_entry, "switch")
assert forward_entry_setup.mock_calls[3][1] == (config_entry, "fan")
assert forward_entry_setup.mock_calls[4][1] == (config_entry, "light")
assert forward_entry_setup.mock_calls[5][1] == (config_entry, "lock")
assert forward_entry_setup.mock_calls[6][1] == (config_entry, "scene")
assert forward_entry_setup.mock_calls[7][1] == (config_entry, "sensor")
assert forward_entry_setup.mock_calls[8][1] == (config_entry, "switch")
async def test_gateway_retry(hass):