1 """Data update coordinator for the jvc_projector integration."""
3 from __future__
import annotations
5 from datetime
import timedelta
9 from jvcprojector
import (
11 JvcProjectorAuthError,
12 JvcProjectorConnectError,
21 from .const
import NAME
23 _LOGGER = logging.getLogger(__name__)
30 """Data update coordinator for the JVC Projector integration."""
32 def __init__(self, hass: HomeAssistant, device: JvcProjector) ->
None:
33 """Initialize the coordinator."""
38 update_interval=INTERVAL_SLOW,
45 """Get the latest state data."""
48 except JvcProjectorConnectError
as err:
49 raise UpdateFailed(f
"Unable to connect to {self.device.host}")
from err
50 except JvcProjectorAuthError
as err:
55 if state[const.POWER] != const.STANDBY:
dict[str, Any] _async_update_data(self)
None __init__(self, HomeAssistant hass, JvcProjector device)
None update_interval(self, timedelta|None value)
timedelta|None update_interval(self)
str|float get_state(dict[str, float] data, str key)