Fix calling notify.notify with mobile_app targets in play. Fixes #24064 (#24156)

This commit is contained in:
Robbie Trencheny 2019-05-29 09:09:25 -07:00 committed by Paulus Schoutsen
parent 6947f8cb2e
commit a252065f99

View File

@ -89,13 +89,12 @@ class MobileAppNotificationService(BaseNotificationService):
targets = kwargs.get(ATTR_TARGET)
if not targets:
targets = push_registrations(self.hass)
targets = push_registrations(self.hass).values()
if kwargs.get(ATTR_DATA) is not None:
data[ATTR_DATA] = kwargs.get(ATTR_DATA)
for target in targets:
entry = self.hass.data[DOMAIN][DATA_CONFIG_ENTRIES][target]
entry_data = entry.data