From 98cf3f4aa30cb0af02fffcb5561760d1a6dfc732 Mon Sep 17 00:00:00 2001 From: guillempages Date: Fri, 25 Oct 2019 16:08:11 +0200 Subject: [PATCH] [homematic]Add support for HmIP-BSL LEDs (#27307) With this commit, 3 entities are created for the HmIP-BSL device: 2 lights for the two independent LEDs and 1 switch for the relais --- homeassistant/components/homematic/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/homeassistant/components/homematic/__init__.py b/homeassistant/components/homematic/__init__.py index cd791434f90..42fb73f6da2 100644 --- a/homeassistant/components/homematic/__init__.py +++ b/homeassistant/components/homematic/__init__.py @@ -82,6 +82,7 @@ HM_DEVICE_TYPES = { "IPKeySwitchPowermeter", "IPGarage", "IPKeySwitch", + "IPKeySwitchLevel", "IPMultiIO", ], DISCOVER_LIGHTS: [ @@ -90,6 +91,7 @@ HM_DEVICE_TYPES = { "IPKeyDimmer", "IPDimmer", "ColorEffectLight", + "IPKeySwitchLevel", ], DISCOVER_SENSORS: [ "SwitchPowermeter", @@ -671,6 +673,11 @@ def _get_devices(hass, discovery_type, keys, interface): and class_name not in HM_IGNORE_DISCOVERY_NODE_EXCEPTIONS.get(param, []) ): continue + if discovery_type == DISCOVER_SWITCHES and class_name == "IPKeySwitchLevel": + channels.remove(8) + channels.remove(12) + if discovery_type == DISCOVER_LIGHTS and class_name == "IPKeySwitchLevel": + channels.remove(4) # Add devices _LOGGER.debug(