Added plugin_name to weather.buienradar events

This commit is contained in:
Fabio Manganiello 2021-07-04 18:04:51 +02:00
parent 1f6c7aae60
commit ade3a7c2cf

View file

@ -37,12 +37,16 @@ class WeatherBuienradarBackend(Backend):
del weather['measured'] del weather['measured']
if precip != self.last_precip: 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'), total=precip.get('total'),
time_frame=precip.get('time_frame'))) time_frame=precip.get('time_frame')))
if weather != self.last_weather: 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_weather = weather
self.last_precip = precip self.last_precip = precip