Skip to content

Commit 1447b2a

Browse files
committed
implement getting states using self.hass.states.async_entity_ids
1 parent 6ffaaee commit 1447b2a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

custom_components/pyscript/handler.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ def __init__(self, hass):
5555
self.loggers = {}
5656

5757
async def states(self, domain=None):
58-
return [
59-
state
60-
for state in self.hass.states.keys()
61-
if state.split(".", 1)[0] == domain
62-
]
58+
return self.hass.states.async_entity_ids(domain)
6359

6460
async def async_sleep(self, duration):
6561
"""Implement task.sleep()."""

0 commit comments

Comments
 (0)