Log warning when entities referenced in service call not found (#31427)

* Raise entities not found error

* Make it a warning, not an error

* Add support for MATCH_ENTITY_NONE

* Fix lint

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-02-04 14:42:07 -08:00
1 parent 201ea2557e
commit f41623ca64
16 files changed
+339 -89

No files matched your search

@@ -29,6 +29,7 @@ from homeassistant.const import (
CONF_HOST,
CONF_NAME,
ENTITY_MATCH_ALL,
ENTITY_MATCH_NONE,
STATE_OFF,
STATE_ON,
)
@@ -137,6 +138,9 @@ class LgWebOSMediaPlayerEntity(MediaPlayerDevice):
async def async_signal_handler(self, data):
"""Handle domain-specific signal by calling appropriate method."""
entity_ids = data[ATTR_ENTITY_ID]
if entity_ids == ENTITY_MATCH_NONE:
return
if entity_ids == ENTITY_MATCH_ALL or self.entity_id in entity_ids:
params = {
key: value