From a670ac25fd53e68b91f695688e765288e7996ce6 Mon Sep 17 00:00:00 2001 From: Steve Easley Date: Thu, 18 Jan 2024 17:36:57 -0500 Subject: [PATCH] Fix remote control codes for jvc_projector (#108253) Update dependency to add/fix remote codes --- homeassistant/components/jvc_projector/manifest.json | 2 +- homeassistant/components/jvc_projector/remote.py | 12 ++++++++++++ requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/jvc_projector/test_remote.py | 8 ++++++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/jvc_projector/manifest.json b/homeassistant/components/jvc_projector/manifest.json index bc01da5d89a..a7c08bb9f51 100644 --- a/homeassistant/components/jvc_projector/manifest.json +++ b/homeassistant/components/jvc_projector/manifest.json @@ -7,5 +7,5 @@ "integration_type": "device", "iot_class": "local_polling", "loggers": ["jvcprojector"], - "requirements": ["pyjvcprojector==1.0.6"] + "requirements": ["pyjvcprojector==1.0.9"] } diff --git a/homeassistant/components/jvc_projector/remote.py b/homeassistant/components/jvc_projector/remote.py index 45f797a5aaa..dcc9e5cff51 100644 --- a/homeassistant/components/jvc_projector/remote.py +++ b/homeassistant/components/jvc_projector/remote.py @@ -36,6 +36,18 @@ COMMANDS = { "lens_control": const.REMOTE_LENS_CONTROL, "setting_memory": const.REMOTE_SETTING_MEMORY, "gamma_settings": const.REMOTE_GAMMA_SETTINGS, + "hdmi_1": const.REMOTE_HDMI_1, + "hdmi_2": const.REMOTE_HDMI_2, + "mode_1": const.REMOTE_MODE_1, + "mode_2": const.REMOTE_MODE_2, + "mode_3": const.REMOTE_MODE_3, + "lens_ap": const.REMOTE_LENS_AP, + "gamma": const.REMOTE_GAMMA, + "color_temp": const.REMOTE_COLOR_TEMP, + "natural": const.REMOTE_NATURAL, + "cinema": const.REMOTE_CINEMA, + "anamo": const.REMOTE_ANAMO, + "3d_format": const.REMOTE_3D_FORMAT, } _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index 71adc51d1b8..3ca4bd64f66 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1858,7 +1858,7 @@ pyisy==3.1.14 pyitachip2ir==0.0.7 # homeassistant.components.jvc_projector -pyjvcprojector==1.0.6 +pyjvcprojector==1.0.9 # homeassistant.components.kaleidescape pykaleidescape==1.0.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 130537b59ce..f0b527b3a33 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1418,7 +1418,7 @@ pyiss==1.0.1 pyisy==3.1.14 # homeassistant.components.jvc_projector -pyjvcprojector==1.0.6 +pyjvcprojector==1.0.9 # homeassistant.components.kaleidescape pykaleidescape==1.0.1 diff --git a/tests/components/jvc_projector/test_remote.py b/tests/components/jvc_projector/test_remote.py index 5505e160ca7..28bf835e032 100644 --- a/tests/components/jvc_projector/test_remote.py +++ b/tests/components/jvc_projector/test_remote.py @@ -61,6 +61,14 @@ async def test_commands( ) assert mock_device.remote.call_count == 1 + await hass.services.async_call( + REMOTE_DOMAIN, + SERVICE_SEND_COMMAND, + {ATTR_ENTITY_ID: ENTITY_ID, ATTR_COMMAND: ["hdmi_1"]}, + blocking=True, + ) + assert mock_device.remote.call_count == 2 + async def test_unknown_command( hass: HomeAssistant,