mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Discovery listener on all EntityComponents (#2042)
This commit is contained in:
parent
c341ae0a39
commit
fbe940139a
@ -69,9 +69,8 @@ class EntityComponent(object):
|
|||||||
"""Callback to load a platform."""
|
"""Callback to load a platform."""
|
||||||
platform = info.pop(discovery.LOAD_PLATFORM)
|
platform = info.pop(discovery.LOAD_PLATFORM)
|
||||||
self._setup_platform(platform, {}, info if info else None)
|
self._setup_platform(platform, {}, info if info else None)
|
||||||
discovery.listen(
|
discovery.listen(self.hass, discovery.LOAD_PLATFORM + '.' +
|
||||||
self.hass, discovery.LOAD_PLATFORM + '.' + self.domain,
|
self.domain, load_platform_callback)
|
||||||
load_platform_callback)
|
|
||||||
|
|
||||||
def extract_from_service(self, service):
|
def extract_from_service(self, service):
|
||||||
"""Extract all known entities from a service call.
|
"""Extract all known entities from a service call.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user