From 0c0c86bf7b596988f51b0327eba7533690a4efc3 Mon Sep 17 00:00:00 2001 From: Tom Harris Date: Tue, 21 Mar 2023 03:56:44 -0400 Subject: [PATCH] Add support for new Insteon i3 devcies (#89892) --- homeassistant/components/insteon/ipdb.py | 28 +++++++++++++------ .../components/insteon/manifest.json | 4 +-- requirements_all.txt | 4 +-- requirements_test_all.txt | 4 +-- tests/components/insteon/mock_devices.py | 4 +-- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/homeassistant/components/insteon/ipdb.py b/homeassistant/components/insteon/ipdb.py index 46302d3e6ad..fea1262bffd 100644 --- a/homeassistant/components/insteon/ipdb.py +++ b/homeassistant/components/insteon/ipdb.py @@ -4,14 +4,17 @@ from pyinsteon.device_types.ipdb import ( ClimateControl_Thermostat, ClimateControl_WirelessThermostat, DimmableLightingControl, + DimmableLightingControl_Dial, DimmableLightingControl_DinRail, DimmableLightingControl_FanLinc, - DimmableLightingControl_InLineLinc, + DimmableLightingControl_InLineLinc01, + DimmableLightingControl_InLineLinc02, DimmableLightingControl_KeypadLinc_6, DimmableLightingControl_KeypadLinc_8, DimmableLightingControl_LampLinc, DimmableLightingControl_OutletLinc, - DimmableLightingControl_SwitchLinc, + DimmableLightingControl_SwitchLinc01, + DimmableLightingControl_SwitchLinc02, DimmableLightingControl_ToggleLinc, EnergyManagement_LoadController, GeneralController_ControlLinc, @@ -28,12 +31,15 @@ from pyinsteon.device_types.ipdb import ( SwitchedLightingControl, SwitchedLightingControl_ApplianceLinc, SwitchedLightingControl_DinRail, - SwitchedLightingControl_InLineLinc, + SwitchedLightingControl_I3Outlet, + SwitchedLightingControl_InLineLinc01, + SwitchedLightingControl_InLineLinc02, SwitchedLightingControl_KeypadLinc_6, SwitchedLightingControl_KeypadLinc_8, SwitchedLightingControl_OnOffOutlet, SwitchedLightingControl_OutletLinc, - SwitchedLightingControl_SwitchLinc, + SwitchedLightingControl_SwitchLinc01, + SwitchedLightingControl_SwitchLinc02, SwitchedLightingControl_ToggleLinc, WindowCovering, X10Dimmable, @@ -54,9 +60,11 @@ from .const import ON_OFF_EVENTS DEVICE_PLATFORM = { AccessControl_Morningstar: {LOCK: [1]}, DimmableLightingControl: {LIGHT: [1], ON_OFF_EVENTS: [1]}, + DimmableLightingControl_Dial: {LIGHT: [1], ON_OFF_EVENTS: [1]}, DimmableLightingControl_DinRail: {LIGHT: [1], ON_OFF_EVENTS: [1]}, DimmableLightingControl_FanLinc: {LIGHT: [1], FAN: [2], ON_OFF_EVENTS: [1, 2]}, - DimmableLightingControl_InLineLinc: {LIGHT: [1], ON_OFF_EVENTS: [1]}, + DimmableLightingControl_InLineLinc01: {LIGHT: [1], ON_OFF_EVENTS: [1]}, + DimmableLightingControl_InLineLinc02: {LIGHT: [1], ON_OFF_EVENTS: [1]}, DimmableLightingControl_KeypadLinc_6: { LIGHT: [1], SWITCH: [3, 4, 5, 6], @@ -69,7 +77,8 @@ DEVICE_PLATFORM = { }, DimmableLightingControl_LampLinc: {LIGHT: [1], ON_OFF_EVENTS: [1]}, DimmableLightingControl_OutletLinc: {LIGHT: [1], ON_OFF_EVENTS: [1]}, - DimmableLightingControl_SwitchLinc: {LIGHT: [1], ON_OFF_EVENTS: [1]}, + DimmableLightingControl_SwitchLinc01: {LIGHT: [1], ON_OFF_EVENTS: [1]}, + DimmableLightingControl_SwitchLinc02: {LIGHT: [1], ON_OFF_EVENTS: [1]}, DimmableLightingControl_ToggleLinc: {LIGHT: [1], ON_OFF_EVENTS: [1]}, EnergyManagement_LoadController: {SWITCH: [1], BINARY_SENSOR: [2]}, GeneralController_ControlLinc: {ON_OFF_EVENTS: [1]}, @@ -86,7 +95,9 @@ DEVICE_PLATFORM = { SwitchedLightingControl: {SWITCH: [1], ON_OFF_EVENTS: [1]}, SwitchedLightingControl_ApplianceLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]}, SwitchedLightingControl_DinRail: {SWITCH: [1], ON_OFF_EVENTS: [1]}, - SwitchedLightingControl_InLineLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]}, + SwitchedLightingControl_I3Outlet: {SWITCH: [1, 2], ON_OFF_EVENTS: [1, 2]}, + SwitchedLightingControl_InLineLinc01: {SWITCH: [1], ON_OFF_EVENTS: [1]}, + SwitchedLightingControl_InLineLinc02: {SWITCH: [1], ON_OFF_EVENTS: [1]}, SwitchedLightingControl_KeypadLinc_6: { SWITCH: [1, 3, 4, 5, 6], ON_OFF_EVENTS: [1, 3, 4, 5, 6], @@ -97,7 +108,8 @@ DEVICE_PLATFORM = { }, SwitchedLightingControl_OnOffOutlet: {SWITCH: [1, 2], ON_OFF_EVENTS: [1, 2]}, SwitchedLightingControl_OutletLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]}, - SwitchedLightingControl_SwitchLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]}, + SwitchedLightingControl_SwitchLinc01: {SWITCH: [1], ON_OFF_EVENTS: [1]}, + SwitchedLightingControl_SwitchLinc02: {SWITCH: [1], ON_OFF_EVENTS: [1]}, SwitchedLightingControl_ToggleLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]}, ClimateControl_Thermostat: {CLIMATE: [1]}, ClimateControl_WirelessThermostat: {CLIMATE: [1]}, diff --git a/homeassistant/components/insteon/manifest.json b/homeassistant/components/insteon/manifest.json index 743e7e4fa19..af9396399af 100644 --- a/homeassistant/components/insteon/manifest.json +++ b/homeassistant/components/insteon/manifest.json @@ -17,8 +17,8 @@ "iot_class": "local_push", "loggers": ["pyinsteon", "pypubsub"], "requirements": [ - "pyinsteon==1.3.4", - "insteon-frontend-home-assistant==0.3.3" + "pyinsteon==1.4.0", + "insteon-frontend-home-assistant==0.3.4" ], "usb": [ { diff --git a/requirements_all.txt b/requirements_all.txt index 7e74fa1e8ac..d7d30cc9871 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -979,7 +979,7 @@ influxdb==5.3.1 inkbird-ble==0.5.6 # homeassistant.components.insteon -insteon-frontend-home-assistant==0.3.3 +insteon-frontend-home-assistant==0.3.4 # homeassistant.components.intellifire intellifire4py==2.2.2 @@ -1687,7 +1687,7 @@ pyialarm==2.2.0 pyicloud==1.0.0 # homeassistant.components.insteon -pyinsteon==1.3.4 +pyinsteon==1.4.0 # homeassistant.components.intesishome pyintesishome==1.8.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 443f1b79e96..19e29a7c2fd 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -741,7 +741,7 @@ influxdb==5.3.1 inkbird-ble==0.5.6 # homeassistant.components.insteon -insteon-frontend-home-assistant==0.3.3 +insteon-frontend-home-assistant==0.3.4 # homeassistant.components.intellifire intellifire4py==2.2.2 @@ -1215,7 +1215,7 @@ pyialarm==2.2.0 pyicloud==1.0.0 # homeassistant.components.insteon -pyinsteon==1.3.4 +pyinsteon==1.4.0 # homeassistant.components.ipma pyipma==3.0.6 diff --git a/tests/components/insteon/mock_devices.py b/tests/components/insteon/mock_devices.py index e1f36ab6411..dd0ab0b56a0 100644 --- a/tests/components/insteon/mock_devices.py +++ b/tests/components/insteon/mock_devices.py @@ -11,14 +11,14 @@ from pyinsteon.device_types.ipdb import ( GeneralController_RemoteLinc, Hub, SensorsActuators_IOLink, - SwitchedLightingControl_SwitchLinc, + SwitchedLightingControl_SwitchLinc02, ) from pyinsteon.managers.saved_devices_manager import dict_to_aldb_record from pyinsteon.topics import DEVICE_LIST_CHANGED from pyinsteon.utils import subscribe_topic -class MockSwitchLinc(SwitchedLightingControl_SwitchLinc): +class MockSwitchLinc(SwitchedLightingControl_SwitchLinc02): """Mock SwitchLinc device.""" @property