From 6c8d52e375b365afa3738f61e19f00db17d83cd3 Mon Sep 17 00:00:00 2001 From: "Alan D. Tse" Date: Tue, 14 Jan 2020 23:10:51 -0800 Subject: [PATCH] perf(media_player): stop unnecessary event processing --- custom_components/alexa_media/media_player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/alexa_media/media_player.py b/custom_components/alexa_media/media_player.py index 522061d9..0f0ba4ab 100644 --- a/custom_components/alexa_media/media_player.py +++ b/custom_components/alexa_media/media_player.py @@ -263,7 +263,7 @@ async def _refresh_if_no_audiopush(already_refreshed=False): if event.data["queue_state"] else None ) - if not event_serial: + if not event_serial or event_serial != self.device_serial_number: return self.available = True self.async_schedule_update_ha_state()