mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 11:33:11 -04:00
Sort entities in default groups by name (#7681)
* Sort entities in default groups by name * Cleanups from review
This commit is contained in:
committed by
Paulus Schoutsen
parent
b3cb057aac
commit
bb8de5845a
@@ -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