Fix sensibo test coverage to 100% (#132202)

This commit is contained in:
G Johansson
2024-12-04 11:19:11 +01:00
committed by GitHub
parent f0c07d68c5
commit 5a1d5802c4
3 changed files with 14 additions and 11 deletions

View File

@@ -347,6 +347,17 @@ async def test_climate_temperatures(
state2 = hass.states.get("climate.hallway")
assert state2.attributes["temperature"] == 20
with patch(
"homeassistant.components.sensibo.coordinator.SensiboClient.async_set_ac_state_property",
) as mock_call:
await hass.services.async_call(
CLIMATE_DOMAIN,
SERVICE_SET_TEMPERATURE,
{ATTR_ENTITY_ID: state1.entity_id, ATTR_TEMPERATURE: 20},
blocking=True,
)
assert not mock_call.called
with (
patch(
"homeassistant.components.sensibo.coordinator.SensiboClient.async_get_devices_data",