From ade3a7c2cfb738cb3cc359e257db813cb579b03e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 4 Jul 2021 18:04:51 +0200 Subject: [PATCH] Added plugin_name to weather.buienradar events --- platypush/backend/weather/buienradar.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platypush/backend/weather/buienradar.py b/platypush/backend/weather/buienradar.py index 5caaf37f..281b42d2 100644 --- a/platypush/backend/weather/buienradar.py +++ b/platypush/backend/weather/buienradar.py @@ -37,12 +37,16 @@ class WeatherBuienradarBackend(Backend): del weather['measured'] if precip != self.last_precip: - self.bus.post(NewPrecipitationForecastEvent(average=precip.get('average'), + self.bus.post(NewPrecipitationForecastEvent(plugin_name='weather.buienradar', + average=precip.get('average'), total=precip.get('total'), time_frame=precip.get('time_frame'))) if weather != self.last_weather: - self.bus.post(NewWeatherConditionEvent(**weather)) + self.bus.post(NewWeatherConditionEvent(**{ + **weather, + 'plugin_name': 'weather.buienradar', + })) self.last_weather = weather self.last_precip = precip