Fix jvcprojector command timeout with some projectors (#116392)

* Fix projector timeout in pyprojector lib v1.0.10

* Fix projector timeout by increasing time between power command and refresh.

* Bump jvcprojector lib to ensure unknown power states are handled
This commit is contained in:
Steve Easley 2024-04-29 12:25:16 -04:00 committed by GitHub
parent 180e178a69
commit 420d6a2d9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 3 deletions

View file

@ -7,5 +7,5 @@
"integration_type": "device",
"iot_class": "local_polling",
"loggers": ["jvcprojector"],
"requirements": ["pyjvcprojector==1.0.9"]
"requirements": ["pyjvcprojector==1.0.11"]
}

View file

@ -2,6 +2,7 @@
from __future__ import annotations
import asyncio
from collections.abc import Iterable
import logging
from typing import Any
@ -74,11 +75,13 @@ class JvcProjectorRemote(JvcProjectorEntity, RemoteEntity):
async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn the device on."""
await self.device.power_on()
await asyncio.sleep(1)
await self.coordinator.async_refresh()
async def async_turn_off(self, **kwargs: Any) -> None:
"""Turn the device off."""
await self.device.power_off()
await asyncio.sleep(1)
await self.coordinator.async_refresh()
async def async_send_command(self, command: Iterable[str], **kwargs: Any) -> None:

View file

@ -1902,7 +1902,7 @@ pyisy==3.1.14
pyitachip2ir==0.0.7
# homeassistant.components.jvc_projector
pyjvcprojector==1.0.9
pyjvcprojector==1.0.11
# homeassistant.components.kaleidescape
pykaleidescape==1.0.1

View file

@ -1483,7 +1483,7 @@ pyiss==1.0.1
pyisy==3.1.14
# homeassistant.components.jvc_projector
pyjvcprojector==1.0.9
pyjvcprojector==1.0.11
# homeassistant.components.kaleidescape
pykaleidescape==1.0.1