Enable Ruff SIM117 (#86783)
This commit is contained in:
parent
57cf11f067
commit
a79885ceaf
25 changed files with 441 additions and 453 deletions
|
@ -75,14 +75,13 @@ async def test_entity_failed_service_calls(
|
|||
with patch(
|
||||
"homeassistant.components.sensibo.util.SensiboClient.async_set_ac_state_property",
|
||||
side_effect=p_error,
|
||||
):
|
||||
with pytest.raises(HomeAssistantError):
|
||||
await hass.services.async_call(
|
||||
CLIMATE_DOMAIN,
|
||||
SERVICE_SET_FAN_MODE,
|
||||
{ATTR_ENTITY_ID: state.entity_id, ATTR_FAN_MODE: "low"},
|
||||
blocking=True,
|
||||
)
|
||||
), pytest.raises(HomeAssistantError):
|
||||
await hass.services.async_call(
|
||||
CLIMATE_DOMAIN,
|
||||
SERVICE_SET_FAN_MODE,
|
||||
{ATTR_ENTITY_ID: state.entity_id, ATTR_FAN_MODE: "low"},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
state = hass.states.get("climate.hallway")
|
||||
assert state.attributes["fan_mode"] == "low"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue