mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 23:41:48 -05:00
Stop calling the Tuya doorbell payloads a doorbell (#180574)
This commit is contained in:
@@ -41,15 +41,15 @@ class TuyaEventEntityDescription(EventEntityDescription):
|
||||
# end up being events.
|
||||
EVENTS: dict[DeviceCategory, tuple[TuyaEventEntityDescription, ...]] = {
|
||||
DeviceCategory.SP: (
|
||||
# Neither of these reports the doorbell being rung, which is what the
|
||||
# doorbell device class stands for; they carry what it sent along
|
||||
TuyaEventEntityDescription(
|
||||
key=DPCode.ALARM_MESSAGE,
|
||||
device_class=EventDeviceClass.DOORBELL,
|
||||
translation_key="doorbell_message",
|
||||
wrapper_class=Base64Utf8StringEventWrapper,
|
||||
),
|
||||
TuyaEventEntityDescription(
|
||||
key=DPCode.DOORBELL_PIC,
|
||||
device_class=EventDeviceClass.DOORBELL,
|
||||
translation_key="doorbell_picture",
|
||||
wrapper_class=Base64Utf8RawEventWrapper,
|
||||
),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# serializer version: 1
|
||||
# name: test_alarm_message_event[event.intercom_doorbell_message-alarm_message-eyJzb21lIjogImpzb24iLCAicmFuZG9tIjogImRhdGEifQ==-sp_csr2fqitalj5o0tq]
|
||||
ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -12,7 +11,6 @@
|
||||
# ---
|
||||
# name: test_alarm_message_event[event.intercom_doorbell_picture-doorbell_pic-aHR0cHM6Ly9zb21lLXBpY3R1cmUtdXJsLmNvbS9pbWFnZS5qcGc=-sp_csr2fqitalj5o0tq]
|
||||
ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -235,7 +233,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -250,7 +248,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.burocam_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -295,7 +292,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -310,7 +307,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.c9_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -355,7 +351,7 @@
|
||||
'object_id_base': 'Doorbell picture',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell picture',
|
||||
'platform': 'tuya',
|
||||
@@ -370,7 +366,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.c9_doorbell_picture-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -415,7 +410,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -430,7 +425,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.dolni_vchod_zapad_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -475,7 +469,7 @@
|
||||
'object_id_base': 'Doorbell picture',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell picture',
|
||||
'platform': 'tuya',
|
||||
@@ -490,7 +484,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.dolni_vchod_zapad_doorbell_picture-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -535,7 +528,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -550,7 +543,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.garage_camera_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -595,7 +587,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -610,7 +602,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.intercom_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -655,7 +646,7 @@
|
||||
'object_id_base': 'Doorbell picture',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell picture',
|
||||
'platform': 'tuya',
|
||||
@@ -670,7 +661,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.intercom_doorbell_picture-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -715,7 +705,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -730,7 +720,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.mirilla_puerta_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -775,7 +764,7 @@
|
||||
'object_id_base': 'Doorbell picture',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell picture',
|
||||
'platform': 'tuya',
|
||||
@@ -790,7 +779,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.mirilla_puerta_doorbell_picture-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
@@ -835,7 +823,7 @@
|
||||
'object_id_base': 'Doorbell message',
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <EventDeviceClass.DOORBELL: 'doorbell'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Doorbell message',
|
||||
'platform': 'tuya',
|
||||
@@ -850,7 +838,6 @@
|
||||
# name: test_platform_setup_and_discovery[event.security_camera_doorbell_message-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'doorbell',
|
||||
<EventEntityStateAttribute.EVENT_TYPE: 'event_type'>: 'triggered',
|
||||
<EventEntityCapabilityAttribute.EVENT_TYPES: 'event_types'>: list([
|
||||
'triggered',
|
||||
|
||||
Reference in New Issue
Block a user