mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 09:23:17 -04:00
Fix emulated_kasa tests for Python 3.14.3 (#165667)
This commit is contained in:
@@ -180,6 +180,7 @@ async def test_float(hass: HomeAssistant) -> None:
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: ENTITY_SWITCH}, blocking=True
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
switch = hass.states.get(ENTITY_SWITCH)
|
||||
assert switch.state == STATE_ON
|
||||
@@ -195,6 +196,7 @@ async def test_float(hass: HomeAssistant) -> None:
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: ENTITY_SWITCH}, blocking=True
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
plug_it = emulated_kasa.get_plug_devices(hass, config)
|
||||
plug = next(plug_it).generate_response()
|
||||
@@ -260,6 +262,7 @@ async def test_template(hass: HomeAssistant) -> None:
|
||||
{ATTR_ENTITY_ID: ENTITY_FAN, ATTR_PERCENTAGE: 33},
|
||||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
fan = hass.states.get(ENTITY_FAN)
|
||||
assert fan.state == STATE_ON
|
||||
@@ -278,6 +281,7 @@ async def test_template(hass: HomeAssistant) -> None:
|
||||
{ATTR_ENTITY_ID: ENTITY_FAN, ATTR_PERCENTAGE: 100},
|
||||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
plug_it = emulated_kasa.get_plug_devices(hass, config)
|
||||
plug = next(plug_it).generate_response()
|
||||
assert nested_value(plug, "system", "get_sysinfo", "alias") == ENTITY_FAN_NAME
|
||||
@@ -288,6 +292,7 @@ async def test_template(hass: HomeAssistant) -> None:
|
||||
await hass.services.async_call(
|
||||
FAN_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: ENTITY_FAN}, blocking=True
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
plug_it = emulated_kasa.get_plug_devices(hass, config)
|
||||
plug = next(plug_it).generate_response()
|
||||
assert nested_value(plug, "system", "get_sysinfo", "alias") == ENTITY_FAN_NAME
|
||||
@@ -441,6 +446,7 @@ async def test_multiple_devices(hass: HomeAssistant) -> None:
|
||||
{ATTR_ENTITY_ID: ENTITY_FAN, ATTR_PERCENTAGE: 66},
|
||||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# All of them should now be on
|
||||
switch = hass.states.get(ENTITY_SWITCH)
|
||||
|
||||
Reference in New Issue
Block a user