Sort entities in default groups by name (#7681)
* Sort entities in default groups by name * Cleanups from review
This commit is contained in:
1 parent
b3cb057aac
commit
bb8de5845a
2 files changed
+8
-7
No files matched your search
@@ -92,13 +92,14 @@ class TestHelpersEntityComponent(unittest.TestCase):
|
||||
assert group.attributes.get('entity_id') == ('test_domain.hello',)
|
||||
|
||||
# group extended
|
||||
component.add_entities([EntityTest(name='hello2')])
|
||||
component.add_entities([EntityTest(name='goodbye')])
|
||||
|
||||
assert len(self.hass.states.entity_ids()) == 3
|
||||
group = self.hass.states.get('group.everyone')
|
||||
|
||||
assert sorted(group.attributes.get('entity_id')) == \
|
||||
['test_domain.hello', 'test_domain.hello2']
|
||||
# Sorted order
|
||||
assert group.attributes.get('entity_id') == \
|
||||
('test_domain.goodbye', 'test_domain.hello')
|
||||
|
||||
def test_polling_only_updates_entities_it_should_poll(self):
|
||||
"""Test the polling of only updated entities."""
|
||||
|
||||
Reference in new issue
Block a user