diff --git a/zhaquirks/ikea/__init__.py b/zhaquirks/ikea/__init__.py index 50a7bd56b2..28d2f7304c 100644 --- a/zhaquirks/ikea/__init__.py +++ b/zhaquirks/ikea/__init__.py @@ -143,6 +143,16 @@ class ShortcutV2Cluster(EventableCluster): # ZCL compliant IKEA power configuration clusters: +class PowerConfig1AAACluster(CustomCluster, PowerConfiguration): + """Updating power attributes: 2 AAA.""" + + _CONSTANT_ATTRIBUTES = { + BATTERY_SIZE: 4, + BATTERY_QUANTITY: 1, + BATTERY_RATED_VOLTAGE: 15, + } + + class PowerConfig2AAACluster(CustomCluster, PowerConfiguration): """Updating power attributes: 2 AAA.""" diff --git a/zhaquirks/ikea/twobtnremote.py b/zhaquirks/ikea/twobtnremote.py index 054ac23d1e..cfd89182f3 100644 --- a/zhaquirks/ikea/twobtnremote.py +++ b/zhaquirks/ikea/twobtnremote.py @@ -40,7 +40,12 @@ TURN_OFF, TURN_ON, ) -from zhaquirks.ikea import IKEA, IKEA_CLUSTER_ID, DoublingPowerConfig1CRCluster +from zhaquirks.ikea import ( + IKEA, + IKEA_CLUSTER_ID, + DoublingPowerConfig1CRCluster, + PowerConfig1AAACluster, +) class IkeaTradfriRemote2Btn(CustomDevice): @@ -195,3 +200,64 @@ class IkeaTradfriRemote2BtnZLL(CustomDevice): } device_automation_triggers = IkeaTradfriRemote2Btn.device_automation_triggers.copy() + + +class IkeaRodretRemote2Btn(CustomDevice): + """Custom device representing IKEA of Sweden RODRET remote control.""" + + signature = { + # + MODELS_INFO: [(IKEA, "RODRET Dimmer")], + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER, + INPUT_CLUSTERS: [ + Basic.cluster_id, + PowerConfiguration.cluster_id, + Identify.cluster_id, + PollControl.cluster_id, + LightLink.cluster_id, + IKEA_CLUSTER_ID, + ], + OUTPUT_CLUSTERS: [ + Identify.cluster_id, + Groups.cluster_id, + OnOff.cluster_id, + LevelControl.cluster_id, + Ota.cluster_id, + LightLink.cluster_id, + ], + } + }, + } + + replacement = { + ENDPOINTS: { + 1: { + PROFILE_ID: zha.PROFILE_ID, + DEVICE_TYPE: zha.DeviceType.NON_COLOR_CONTROLLER, + INPUT_CLUSTERS: [ + Basic.cluster_id, + PowerConfig1AAACluster, + Identify.cluster_id, + PollControl.cluster_id, + LightLink.cluster_id, + IKEA_CLUSTER_ID, + ], + OUTPUT_CLUSTERS: [ + Identify.cluster_id, + Groups.cluster_id, + OnOff.cluster_id, + LevelControl.cluster_id, + Ota.cluster_id, + LightLink.cluster_id, + ], + } + } + } + + device_automation_triggers = IkeaTradfriRemote2Btn.device_automation_triggers.copy()