Entity Component to no longer generate automatic groups (#23789)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-01-07 17:30:53 +01:00
1 parent 13e6479b6e
commit 9aa02e35a7
41 files changed
+149 -377

No files matched your search

+1 -8
View File
@@ -4,7 +4,7 @@ import unittest
from homeassistant import core
from homeassistant.components import switch
from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON
from homeassistant.const import CONF_PLATFORM
from homeassistant.setup import async_setup_component, setup_component
from tests.common import get_test_home_assistant, mock_entity_platform
@@ -33,8 +33,6 @@ class TestSwitch(unittest.TestCase):
assert setup_component(
self.hass, switch.DOMAIN, {switch.DOMAIN: {CONF_PLATFORM: "test"}}
)
assert switch.is_on(self.hass)
assert STATE_ON == self.hass.states.get(switch.ENTITY_ID_ALL_SWITCHES).state
assert switch.is_on(self.hass, self.switch_1.entity_id)
assert not switch.is_on(self.hass, self.switch_2.entity_id)
assert not switch.is_on(self.hass, self.switch_3.entity_id)
@@ -44,7 +42,6 @@ class TestSwitch(unittest.TestCase):
self.hass.block_till_done()
assert switch.is_on(self.hass)
assert not switch.is_on(self.hass, self.switch_1.entity_id)
assert switch.is_on(self.hass, self.switch_2.entity_id)
@@ -53,8 +50,6 @@ class TestSwitch(unittest.TestCase):
self.hass.block_till_done()
assert not switch.is_on(self.hass)
assert STATE_OFF == self.hass.states.get(switch.ENTITY_ID_ALL_SWITCHES).state
assert not switch.is_on(self.hass, self.switch_1.entity_id)
assert not switch.is_on(self.hass, self.switch_2.entity_id)
assert not switch.is_on(self.hass, self.switch_3.entity_id)
@@ -64,8 +59,6 @@ class TestSwitch(unittest.TestCase):
self.hass.block_till_done()
assert switch.is_on(self.hass)
assert STATE_ON == self.hass.states.get(switch.ENTITY_ID_ALL_SWITCHES).state
assert switch.is_on(self.hass, self.switch_1.entity_id)
assert switch.is_on(self.hass, self.switch_2.entity_id)
assert switch.is_on(self.hass, self.switch_3.entity_id)