1 """Remote platform for the jvc_projector integration."""
3 from __future__
import annotations
6 from collections.abc
import Iterable
10 from jvcprojector
import const
17 from .
import JVCConfigEntry
18 from .entity
import JvcProjectorEntity
21 "menu": const.REMOTE_MENU,
22 "up": const.REMOTE_UP,
23 "down": const.REMOTE_DOWN,
24 "left": const.REMOTE_LEFT,
25 "right": const.REMOTE_RIGHT,
26 "ok": const.REMOTE_OK,
27 "back": const.REMOTE_BACK,
28 "mpc": const.REMOTE_MPC,
29 "hide": const.REMOTE_HIDE,
30 "info": const.REMOTE_INFO,
31 "input": const.REMOTE_INPUT,
32 "cmd": const.REMOTE_CMD,
33 "advanced_menu": const.REMOTE_ADVANCED_MENU,
34 "picture_mode": const.REMOTE_PICTURE_MODE,
35 "color_profile": const.REMOTE_COLOR_PROFILE,
36 "lens_control": const.REMOTE_LENS_CONTROL,
37 "setting_memory": const.REMOTE_SETTING_MEMORY,
38 "gamma_settings": const.REMOTE_GAMMA_SETTINGS,
39 "hdmi_1": const.REMOTE_HDMI_1,
40 "hdmi_2": const.REMOTE_HDMI_2,
41 "mode_1": const.REMOTE_MODE_1,
42 "mode_2": const.REMOTE_MODE_2,
43 "mode_3": const.REMOTE_MODE_3,
44 "lens_ap": const.REMOTE_LENS_AP,
45 "gamma": const.REMOTE_GAMMA,
46 "color_temp": const.REMOTE_COLOR_TEMP,
47 "natural": const.REMOTE_NATURAL,
48 "cinema": const.REMOTE_CINEMA,
49 "anamo": const.REMOTE_ANAMO,
50 "3d_format": const.REMOTE_3D_FORMAT,
53 _LOGGER = logging.getLogger(__name__)
57 hass: HomeAssistant, entry: JVCConfigEntry, async_add_entities: AddEntitiesCallback
59 """Set up the JVC Projector platform from a config entry."""
60 coordinator = entry.runtime_data
65 """Representation of a JVC Projector device."""
71 """Return True if entity is on."""
72 return self.coordinator.data[
"power"]
in [const.ON, const.WARMING]
75 """Turn the device on."""
77 await asyncio.sleep(1)
81 """Turn the device off."""
83 await asyncio.sleep(1)
87 """Send a remote command to the device."""
89 if cmd
not in COMMANDS:
91 _LOGGER.debug(
"Sending command '%s'", cmd)
JvcProjector device(self)
None async_turn_on(self, **Any kwargs)
None async_send_command(self, Iterable[str] command, **Any kwargs)
None async_turn_off(self, **Any kwargs)
None async_setup_entry(HomeAssistant hass, JVCConfigEntry entry, AddEntitiesCallback async_add_entities)