Fix universal mp service call wth no child (#5411)
This commit is contained in:
1 parent
2a362fd1ff
commit
eb06023aa5
2 files changed
+23
No files matched your search
@@ -190,6 +190,10 @@ class UniversalMediaPlayer(MediaPlayerDevice):
|
||||
return
|
||||
|
||||
active_child = self._child_state
|
||||
if active_child is None:
|
||||
# No child to call service on
|
||||
return
|
||||
|
||||
service_data[ATTR_ENTITY_ID] = active_child.entity_id
|
||||
|
||||
self.hass.services.call(DOMAIN, service_name, service_data,
|
||||
|
||||
Reference in new issue
Block a user