[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
This commit is contained in:
guillempages 2019-10-25 16:08:11 +02:00 committed by Daniel Perna
parent 6bfb2460f2
commit 98cf3f4aa3

View File

@ -82,6 +82,7 @@ HM_DEVICE_TYPES = {
"IPKeySwitchPowermeter", "IPKeySwitchPowermeter",
"IPGarage", "IPGarage",
"IPKeySwitch", "IPKeySwitch",
"IPKeySwitchLevel",
"IPMultiIO", "IPMultiIO",
], ],
DISCOVER_LIGHTS: [ DISCOVER_LIGHTS: [
@ -90,6 +91,7 @@ HM_DEVICE_TYPES = {
"IPKeyDimmer", "IPKeyDimmer",
"IPDimmer", "IPDimmer",
"ColorEffectLight", "ColorEffectLight",
"IPKeySwitchLevel",
], ],
DISCOVER_SENSORS: [ DISCOVER_SENSORS: [
"SwitchPowermeter", "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, []) and class_name not in HM_IGNORE_DISCOVERY_NODE_EXCEPTIONS.get(param, [])
): ):
continue 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 # Add devices
_LOGGER.debug( _LOGGER.debug(