Add zwave_js binary sensors property name for Notification CC (#45810)
parent
2ffdc4694a
commit
0b63510cab
|
@ -349,6 +349,14 @@ class ZWaveNotificationBinarySensor(ZWaveBaseEntity, BinarySensorEntity):
|
|||
return self.info.primary_value.value in self._mapping_info["states"]
|
||||
return bool(self.info.primary_value.value != 0)
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
"""Return default name from device name and value name combination."""
|
||||
node_name = self.info.node.name or self.info.node.device_config.description
|
||||
property_name = self.info.primary_value.property_name
|
||||
property_key_name = self.info.primary_value.property_key_name
|
||||
return f"{node_name}: {property_name}: {property_key_name}"
|
||||
|
||||
@property
|
||||
def device_class(self) -> Optional[str]:
|
||||
"""Return device class."""
|
||||
|
|
|
@ -6,7 +6,9 @@ SWITCH_ENTITY = "switch.smart_plug_with_two_usb_ports_current_value"
|
|||
LOW_BATTERY_BINARY_SENSOR = "binary_sensor.multisensor_6_low_battery_level"
|
||||
ENABLED_LEGACY_BINARY_SENSOR = "binary_sensor.z_wave_door_window_sensor_any"
|
||||
DISABLED_LEGACY_BINARY_SENSOR = "binary_sensor.multisensor_6_any"
|
||||
NOTIFICATION_MOTION_BINARY_SENSOR = "binary_sensor.multisensor_6_motion_sensor_status"
|
||||
NOTIFICATION_MOTION_BINARY_SENSOR = (
|
||||
"binary_sensor.multisensor_6_home_security_motion_sensor_status"
|
||||
)
|
||||
PROPERTY_DOOR_STATUS_BINARY_SENSOR = (
|
||||
"binary_sensor.august_smart_lock_pro_3rd_gen_the_current_status_of_the_door"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue