Skip to content

Commit

Permalink
fixed notify
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasJoKuJonas committed Mar 20, 2024
1 parent e780212 commit cedaeff
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions custom_components/webuntis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,15 +943,25 @@ async def update_notify(self):
notifications = get_notification(updated_items)

for service in self.notify_config.values():
notification["data"] = service.get("data", {})
notification["target"] = service.get("target", {})
notification = {}

data = service.get("data", {})
target = service.get("target", {})

for notification in notifications:
_LOGGER.warning(notification)
if notification["change"] in service["options"]:
data = {
"message": notification["message"],
"title": notification["title"],
"data": data,
"target": target,
}

await async_notify(
self._hass,
service_id=service["entity_id"],
data=notification,
data=data,
)

self.event_list_old = self.event_list
Expand Down

0 comments on commit cedaeff

Please sign in to comment.