diff --git a/custom_components/jvc_projectors/manifest.json b/custom_components/jvc_projectors/manifest.json index 48371b6..981a093 100644 --- a/custom_components/jvc_projectors/manifest.json +++ b/custom_components/jvc_projectors/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://github.com/iloveicedgreentea/jvc_homeassistant", "requirements": [ - "pyjvc==4.4.3" + "pyjvc==4.4.4" ], "ssdp": [], "zeroconf": [], diff --git a/custom_components/jvc_projectors/remote.py b/custom_components/jvc_projectors/remote.py index ba785ed..59166a0 100644 --- a/custom_components/jvc_projectors/remote.py +++ b/custom_components/jvc_projectors/remote.py @@ -208,6 +208,8 @@ async def handle_queue(self): ), timeout=5, ) + # when a command is sent it shifts the buffer by one, this seems to just be easier than figuring that out tbh + await self.jvc_client.commander.read_until_empty() except asyncio.TimeoutError: _LOGGER.debug("Timeout with command %s", command) try: @@ -277,7 +279,9 @@ async def clear_queue(self): # clear the queue _LOGGER.debug("Clearing command queue") self.command_queue = asyncio.PriorityQueue() - _LOGGER.debug("Cleared command queue which is now %s", self.command_queue.qsize()) + _LOGGER.debug( + "Cleared command queue which is now %s", self.command_queue.qsize() + ) _LOGGER.debug("Clearing attr queue") self.attribute_queue = asyncio.Queue()