diff --git a/nabweatherd/nabweatherd.py b/nabweatherd/nabweatherd.py index dbe2b039..bc9dfbd9 100644 --- a/nabweatherd/nabweatherd.py +++ b/nabweatherd/nabweatherd.py @@ -459,7 +459,8 @@ def get_animation(self, info_data): return logging.debug(f"get_animation :{info_data['weather_animation_type']}") - # + + # Rain if (info_data["weather_animation_type"] == "weather_and_rain") or ( info_data["weather_animation_type"] == "rain_only" ): @@ -474,6 +475,7 @@ def get_animation(self, info_data): packet = '{"type":"info",' '"info_id":"nabweatherd_rain"}\r\n' self.writer.write(packet.encode("utf8")) + # Weather if (info_data["weather_animation_type"] == "weather_and_rain") or ( (info_data["weather_animation_type"] == "weather_only") ): @@ -487,8 +489,12 @@ def get_animation(self, info_data): info_data["today_forecast_weather_class"] ] return info_animation - else: - logging.debug("get_animation : return none") + + if info_data["weather_animation_type"] == "nothing": + # Return mais avant on supprime l'animation rain + packet = '{"type":"info",' '"info_id":"nabweatherd_rain"}\r\n' + self.writer.write(packet.encode("utf8")) + logging.debug("get_animation : no visual information") return None async def perform_additional(self, expiration, type, info_data, config_t):