Entity Component to no longer generate automatic groups (#23789)
This commit is contained in:
@@ -62,7 +62,7 @@ async def test_cover(hass):
|
||||
assert "cover.level_controllable_cover" in gateway.deconz_ids
|
||||
assert "cover.window_covering_device" in gateway.deconz_ids
|
||||
assert "cover.unsupported_cover" not in gateway.deconz_ids
|
||||
assert len(hass.states.async_all()) == 5
|
||||
assert len(hass.states.async_all()) == 3
|
||||
|
||||
level_controllable_cover = hass.states.get("cover.level_controllable_cover")
|
||||
assert level_controllable_cover.state == "open"
|
||||
@@ -122,4 +122,4 @@ async def test_cover(hass):
|
||||
|
||||
await gateway.async_reset()
|
||||
|
||||
assert len(hass.states.async_all()) == 2
|
||||
assert len(hass.states.async_all()) == 0
|
||||
|
||||
@@ -91,8 +91,8 @@ async def test_lights_and_groups(hass):
|
||||
assert "light.light_group" in gateway.deconz_ids
|
||||
assert "light.empty_group" not in gateway.deconz_ids
|
||||
assert "light.on_off_switch" not in gateway.deconz_ids
|
||||
# 4 entities + 2 groups (one for switches and one for lights)
|
||||
assert len(hass.states.async_all()) == 6
|
||||
# 4 entities
|
||||
assert len(hass.states.async_all()) == 4
|
||||
|
||||
rgb_light = hass.states.get("light.rgb_light")
|
||||
assert rgb_light.state == "on"
|
||||
@@ -200,7 +200,7 @@ async def test_lights_and_groups(hass):
|
||||
|
||||
await gateway.async_reset()
|
||||
|
||||
assert len(hass.states.async_all()) == 2
|
||||
assert len(hass.states.async_all()) == 0
|
||||
|
||||
|
||||
async def test_disable_light_groups(hass):
|
||||
@@ -218,8 +218,8 @@ async def test_disable_light_groups(hass):
|
||||
assert "light.light_group" not in gateway.deconz_ids
|
||||
assert "light.empty_group" not in gateway.deconz_ids
|
||||
assert "light.on_off_switch" not in gateway.deconz_ids
|
||||
# 4 entities + 2 groups (one for switches and one for lights)
|
||||
assert len(hass.states.async_all()) == 5
|
||||
# 3 entities
|
||||
assert len(hass.states.async_all()) == 3
|
||||
|
||||
rgb_light = hass.states.get("light.rgb_light")
|
||||
assert rgb_light is not None
|
||||
|
||||
@@ -68,7 +68,7 @@ async def test_switches(hass):
|
||||
assert "switch.smart_plug" in gateway.deconz_ids
|
||||
assert "switch.warning_device" in gateway.deconz_ids
|
||||
assert "switch.unsupported_switch" not in gateway.deconz_ids
|
||||
assert len(hass.states.async_all()) == 6
|
||||
assert len(hass.states.async_all()) == 4
|
||||
|
||||
on_off_switch = hass.states.get("switch.on_off_switch")
|
||||
assert on_off_switch.state == "on"
|
||||
@@ -161,4 +161,4 @@ async def test_switches(hass):
|
||||
|
||||
await gateway.async_reset()
|
||||
|
||||
assert len(hass.states.async_all()) == 2
|
||||
assert len(hass.states.async_all()) == 0
|
||||
|
||||
Reference in New Issue
Block a user