Implement mode validation in Climate entity component (#105745)
* Implement mode validation in Climate entity component * Fix some tests * more tests * Fix translations * fix deconz tests * Fix switcher_kis tests * not None * Fix homematicip_cloud test * Always validate * Fix shelly * reverse logic in validation * modes_str --------- Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
e04fda3fad
commit
83f4d3af5c
21 changed files with 342 additions and 77 deletions
|
@ -43,6 +43,7 @@ from homeassistant.const import (
|
|||
STATE_UNAVAILABLE,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import ServiceValidationError
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
|
||||
from . import init_integration
|
||||
|
@ -337,7 +338,7 @@ async def test_service_calls(
|
|||
|
||||
mock_instance.set_fanspeed.reset_mock()
|
||||
# FAN_MIDDLE is not supported
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(ServiceValidationError):
|
||||
await hass.services.async_call(
|
||||
CLIMATE_DOMAIN,
|
||||
SERVICE_SET_FAN_MODE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue