Add power sensor to WiZ (#73260)
This commit is contained in:
parent
5863d57e73
commit
a9ab98fb45
8 changed files with 95 additions and 11 deletions
|
@ -150,6 +150,17 @@ FAKE_SOCKET = BulbType(
|
|||
white_channels=2,
|
||||
white_to_color_ratio=80,
|
||||
)
|
||||
FAKE_SOCKET_WITH_POWER_MONITORING = BulbType(
|
||||
bulb_type=BulbClass.SOCKET,
|
||||
name="ESP25_SOCKET_01",
|
||||
features=Features(
|
||||
color=False, color_tmp=False, effect=False, brightness=False, dual_head=False
|
||||
),
|
||||
kelvin_range=KelvinRange(2700, 6500),
|
||||
fw_version="1.26.2",
|
||||
white_channels=2,
|
||||
white_to_color_ratio=80,
|
||||
)
|
||||
FAKE_OLD_FIRMWARE_DIMMABLE_BULB = BulbType(
|
||||
bulb_type=BulbClass.DW,
|
||||
name=None,
|
||||
|
@ -197,7 +208,9 @@ def _mocked_wizlight(device, extended_white_range, bulb_type) -> wizlight:
|
|||
)
|
||||
bulb.getMac = AsyncMock(return_value=FAKE_MAC)
|
||||
bulb.turn_on = AsyncMock()
|
||||
bulb.get_power = AsyncMock(return_value=None)
|
||||
bulb.turn_off = AsyncMock()
|
||||
bulb.power_monitoring = False
|
||||
bulb.updateState = AsyncMock(return_value=FAKE_STATE)
|
||||
bulb.getSupportedScenes = AsyncMock(return_value=list(SCENES.values()))
|
||||
bulb.start_push = AsyncMock(side_effect=_save_setup_callback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue