Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID * Address comments Matthew * Require either area_id or entity_id * Fix tests * Fix test
This commit is contained in:
1 parent
9587afc5ce
commit
02d9ed5e36
47 files changed
+538
-626
No files matched your search
@@ -551,7 +551,9 @@ async def test_set_turn_off(hass, air_conditioner):
|
||||
await setup_platform(hass, CLIMATE_DOMAIN, devices=[air_conditioner])
|
||||
state = hass.states.get("climate.air_conditioner")
|
||||
assert state.state == HVAC_MODE_HEAT_COOL
|
||||
await hass.services.async_call(CLIMATE_DOMAIN, SERVICE_TURN_OFF, blocking=True)
|
||||
await hass.services.async_call(
|
||||
CLIMATE_DOMAIN, SERVICE_TURN_OFF, {"entity_id": "all"}, blocking=True
|
||||
)
|
||||
state = hass.states.get("climate.air_conditioner")
|
||||
assert state.state == HVAC_MODE_OFF
|
||||
|
||||
@@ -562,7 +564,9 @@ async def test_set_turn_on(hass, air_conditioner):
|
||||
await setup_platform(hass, CLIMATE_DOMAIN, devices=[air_conditioner])
|
||||
state = hass.states.get("climate.air_conditioner")
|
||||
assert state.state == HVAC_MODE_OFF
|
||||
await hass.services.async_call(CLIMATE_DOMAIN, SERVICE_TURN_ON, blocking=True)
|
||||
await hass.services.async_call(
|
||||
CLIMATE_DOMAIN, SERVICE_TURN_ON, {"entity_id": "all"}, blocking=True
|
||||
)
|
||||
state = hass.states.get("climate.air_conditioner")
|
||||
assert state.state == HVAC_MODE_HEAT_COOL
|
||||
|
||||
|
||||
Reference in new issue
Block a user