diff --git a/homeassistant/components/wiz/manifest.json b/homeassistant/components/wiz/manifest.json index 947e7f0b638..2ae78a8af92 100644 --- a/homeassistant/components/wiz/manifest.json +++ b/homeassistant/components/wiz/manifest.json @@ -26,5 +26,5 @@ ], "documentation": "https://www.home-assistant.io/integrations/wiz", "iot_class": "local_push", - "requirements": ["pywizlight==0.6.2"] + "requirements": ["pywizlight==0.6.3"] } diff --git a/requirements_all.txt b/requirements_all.txt index eb8e3f82e56..4df5bf20ce2 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2589,7 +2589,7 @@ pywemo==1.4.0 pywilight==0.0.74 # homeassistant.components.wiz -pywizlight==0.6.2 +pywizlight==0.6.3 # homeassistant.components.wmspro pywmspro==0.2.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 4dc82a30a60..a2fc9b75337 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -2144,7 +2144,7 @@ pywemo==1.4.0 pywilight==0.0.74 # homeassistant.components.wiz -pywizlight==0.6.2 +pywizlight==0.6.3 # homeassistant.components.wmspro pywmspro==0.2.2 diff --git a/tests/components/wiz/test_light.py b/tests/components/wiz/test_light.py index 5c74d407238..c49652825ad 100644 --- a/tests/components/wiz/test_light.py +++ b/tests/components/wiz/test_light.py @@ -80,9 +80,11 @@ async def test_rgbww_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"b": 3, "c": 4, "g": 2, "r": 1, "state": True, "w": 5} + assert pilot.pilot_params == {"b": 3, "c": 4, "g": 2, "r": 1, "w": 5} - await async_push_update(hass, bulb, {"mac": FAKE_MAC, **pilot.pilot_params}) + await async_push_update( + hass, bulb, {"mac": FAKE_MAC, "state": True, **pilot.pilot_params} + ) state = hass.states.get(entity_id) assert state.state == STATE_ON assert state.attributes[ATTR_RGBWW_COLOR] == (1, 2, 3, 4, 5) @@ -95,8 +97,10 @@ async def test_rgbww_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"dimming": 50, "temp": 6535, "state": True} - await async_push_update(hass, bulb, {"mac": FAKE_MAC, **pilot.pilot_params}) + assert pilot.pilot_params == {"dimming": 50, "temp": 6535} + await async_push_update( + hass, bulb, {"mac": FAKE_MAC, "state": True, **pilot.pilot_params} + ) state = hass.states.get(entity_id) assert state.state == STATE_ON assert state.attributes[ATTR_COLOR_TEMP_KELVIN] == 6535 @@ -109,8 +113,10 @@ async def test_rgbww_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"sceneId": 1, "state": True} - await async_push_update(hass, bulb, {"mac": FAKE_MAC, **pilot.pilot_params}) + assert pilot.pilot_params == {"sceneId": 1} + await async_push_update( + hass, bulb, {"mac": FAKE_MAC, "state": True, **pilot.pilot_params} + ) state = hass.states.get(entity_id) assert state.state == STATE_ON assert state.attributes[ATTR_EFFECT] == "Ocean" @@ -123,7 +129,7 @@ async def test_rgbww_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"state": True} + assert pilot.pilot_params == {} async def test_rgbw_light(hass: HomeAssistant) -> None: @@ -137,9 +143,11 @@ async def test_rgbw_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"b": 3, "g": 2, "r": 1, "state": True, "w": 4} + assert pilot.pilot_params == {"b": 3, "g": 2, "r": 1, "w": 4} - await async_push_update(hass, bulb, {"mac": FAKE_MAC, **pilot.pilot_params}) + await async_push_update( + hass, bulb, {"mac": FAKE_MAC, "state": True, **pilot.pilot_params} + ) state = hass.states.get(entity_id) assert state.state == STATE_ON assert state.attributes[ATTR_RGBW_COLOR] == (1, 2, 3, 4) @@ -152,7 +160,7 @@ async def test_rgbw_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"dimming": 50, "temp": 6535, "state": True} + assert pilot.pilot_params == {"dimming": 50, "temp": 6535} async def test_turnable_light(hass: HomeAssistant) -> None: @@ -166,9 +174,11 @@ async def test_turnable_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"dimming": 50, "temp": 6535, "state": True} + assert pilot.pilot_params == {"dimming": 50, "temp": 6535} - await async_push_update(hass, bulb, {"mac": FAKE_MAC, **pilot.pilot_params}) + await async_push_update( + hass, bulb, {"mac": FAKE_MAC, "state": True, **pilot.pilot_params} + ) state = hass.states.get(entity_id) assert state.state == STATE_ON assert state.attributes[ATTR_COLOR_TEMP_KELVIN] == 6535 @@ -187,9 +197,11 @@ async def test_old_firmware_dimmable_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"dimming": 50, "state": True} + assert pilot.pilot_params == {"dimming": 50} - await async_push_update(hass, bulb, {"mac": FAKE_MAC, **pilot.pilot_params}) + await async_push_update( + hass, bulb, {"mac": FAKE_MAC, "state": True, **pilot.pilot_params} + ) state = hass.states.get(entity_id) assert state.state == STATE_ON assert state.attributes[ATTR_BRIGHTNESS] == 128 @@ -202,4 +214,4 @@ async def test_old_firmware_dimmable_light(hass: HomeAssistant) -> None: blocking=True, ) pilot: PilotBuilder = bulb.turn_on.mock_calls[0][1][0] - assert pilot.pilot_params == {"dimming": 100, "state": True} + assert pilot.pilot_params == {"dimming": 100}