mirror of
https://github.com/elisspace/core.git
synced 2026-10-05 16:56:19 +00:00
Speed up TP-Link lights (#33606)
* Speed up TP-Link lights * Color temp kan be None * hs as int, force color temp=0 * Fix color temp? * Additional tplink cleanups to reduce api calls * Update test to return state, remove Throttle * Fix state restore on off/on * Fix lights without hue/sat Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
J. Nick Koston
parent
245eae89eb
commit
ebac7b7aad
@@ -85,6 +85,7 @@ def light_mock_data_fixture() -> None:
|
||||
|
||||
light_state.update(state)
|
||||
light_state["dft_on_state"] = drt_on_state
|
||||
return light_state
|
||||
|
||||
set_light_state_patch = patch(
|
||||
"homeassistant.components.tplink.common.SmartBulb.set_light_state",
|
||||
@@ -310,7 +311,7 @@ async def test_get_light_state_retry(
|
||||
if set_state_call_count == 1:
|
||||
raise SmartDeviceException()
|
||||
|
||||
light_mock_data.set_light_state(state_data)
|
||||
return light_mock_data.set_light_state(state_data)
|
||||
|
||||
light_mock_data.set_light_state_mock.side_effect = set_light_state_side_effect
|
||||
|
||||
|
||||
Reference in New Issue
Block a user