deCONZ - Directly reflect changes to config entry options (#31661)
* Directly reflect changes to config entry options * Remove print * Add tests * Add title to config options
This commit is contained in:
1 parent
17f3332c89
commit
b5df2ba853
12 files changed
+188
-22
No files matched your search
@@ -214,6 +214,30 @@ async def test_clip_climate_device(hass):
|
||||
clip_thermostat = hass.states.get("climate.clip_thermostat")
|
||||
assert clip_thermostat.state == "heat"
|
||||
|
||||
hass.config_entries.async_update_entry(
|
||||
gateway.config_entry, options={deconz.gateway.CONF_ALLOW_CLIP_SENSOR: False}
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert "climate.thermostat" in gateway.deconz_ids
|
||||
assert "sensor.thermostat" not in gateway.deconz_ids
|
||||
assert "sensor.thermostat_battery_level" in gateway.deconz_ids
|
||||
assert "climate.presence_sensor" not in gateway.deconz_ids
|
||||
assert "climate.clip_thermostat" not in gateway.deconz_ids
|
||||
assert len(hass.states.async_all()) == 3
|
||||
|
||||
hass.config_entries.async_update_entry(
|
||||
gateway.config_entry, options={deconz.gateway.CONF_ALLOW_CLIP_SENSOR: True}
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert "climate.thermostat" in gateway.deconz_ids
|
||||
assert "sensor.thermostat" not in gateway.deconz_ids
|
||||
assert "sensor.thermostat_battery_level" in gateway.deconz_ids
|
||||
assert "climate.presence_sensor" not in gateway.deconz_ids
|
||||
assert "climate.clip_thermostat" in gateway.deconz_ids
|
||||
assert len(hass.states.async_all()) == 4
|
||||
|
||||
|
||||
async def test_verify_state_update(hass):
|
||||
"""Test that state update properly."""
|
||||
|
||||
Reference in new issue
Block a user