1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add Dynalite switch platform (#32389)

* added presets for switch devices

* added channel type to __init and const

* ran pylint on library so needed a few changes in names

* removed callback

* bool -> cv.boolean
This commit is contained in:
Paulus Schoutsen
2020-03-04 22:05:39 -08:00
committed by GitHub
parent d216c1f2ac
commit 521cc7247d
13 changed files with 134 additions and 31 deletions

View File

@@ -83,5 +83,9 @@ async def test_unload_entry(hass):
) as mock_unload:
assert await hass.config_entries.async_unload(entry.entry_id)
await hass.async_block_till_done()
mock_unload.assert_called_once()
assert mock_unload.mock_calls == [call(entry, "light")]
assert mock_unload.call_count == len(dynalite.ENTITY_PLATFORMS)
expected_calls = [
call(entry, platform) for platform in dynalite.ENTITY_PLATFORMS
]
for cur_call in mock_unload.mock_calls:
assert cur_call in expected_calls