Skip to content

Commit 031c571

Browse files
authored
app sends multiple events at once
1 parent 30e9bb7 commit 031c571

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

custom_components/overwolfstatus/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
async def handle_webhook(
1212
hass: HomeAssistant, webhook_id: str, request: web.Request
1313
) -> web.Response:
14-
"""Fire Overwolf data 1:1 as a Home Assistant event."""
14+
"""Fire Overwolf data 1:1 as a Home Assistant events."""
1515
try:
1616
data = await request.json()
1717
except Exception:
1818
return web.Response(text="Failed to parse payload", status=400)
1919

20-
hass.bus.async_fire(EVENT_NAME, data)
20+
for event in data:
21+
hass.bus.async_fire(EVENT_NAME, event)
2122
return web.Response(text="OK")
2223

2324

0 commit comments

Comments
 (0)