diff --git a/custom_components/eltako/binary_sensor.py b/custom_components/eltako/binary_sensor.py index 70600dbe..99578b97 100644 --- a/custom_components/eltako/binary_sensor.py +++ b/custom_components/eltako/binary_sensor.py @@ -42,7 +42,7 @@ async def async_setup_entry( dev_conf = config_helpers.DeviceConf(entity_config, [CONF_DEVICE_CLASS, CONF_INVERT_SIGNAL]) if dev_conf.eep.eep_string in CONF_EEP_SUPPORTED_BINARY_SENSOR: if dev_conf.eep == A5_30_03: - entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, dev_conf.name, dev_conf.eep, + entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, "Digital Input 0", dev_conf.eep, dev_conf.get(CONF_DEVICE_CLASS), dev_conf.get(CONF_INVERT_SIGNAL), description_key="0")) entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, dev_conf.name, dev_conf.eep, @@ -58,9 +58,11 @@ async def async_setup_entry( dev_conf.get(CONF_DEVICE_CLASS), dev_conf.get(CONF_INVERT_SIGNAL), description_key="wake")) elif dev_conf.eep == A5_30_01: - entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, dev_conf.name, dev_conf.eep, + name = "Digital Input" + entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, name, dev_conf.eep, dev_conf.get(CONF_DEVICE_CLASS), dev_conf.get(CONF_INVERT_SIGNAL))) - entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, dev_conf.name, dev_conf.eep, + name = "Low Battery" + entities.append(EltakoBinarySensor(platform_id, gateway, dev_conf.id, name, dev_conf.eep, dev_conf.get(CONF_DEVICE_CLASS), dev_conf.get(CONF_INVERT_SIGNAL), description_key="low_battery")) else: