From 07975330162f2291b88f899376c00d6f16f6a822 Mon Sep 17 00:00:00 2001 From: PanicRide <99451581+PanicRide@users.noreply.github.com> Date: Fri, 11 Feb 2022 14:58:26 -0800 Subject: [PATCH] New amcrest binary sensor to monitor doorbell button (#66302) * New binary sensor to monitor doorbell button * New binary sensor to monitor doorbell button --- homeassistant/components/amcrest/binary_sensor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/homeassistant/components/amcrest/binary_sensor.py b/homeassistant/components/amcrest/binary_sensor.py index e583aad904b..697dc0cf4c4 100644 --- a/homeassistant/components/amcrest/binary_sensor.py +++ b/homeassistant/components/amcrest/binary_sensor.py @@ -65,6 +65,10 @@ _MOTION_DETECTED_EVENT_CODE = "VideoMotion" _ONLINE_KEY = "online" +_DOORBELL_KEY = "doorbell" +_DOORBELL_NAME = "Doorbell Button" +_DOORBELL_EVENT_CODE = "CallNoAnswered" + BINARY_SENSORS: tuple[AmcrestSensorEntityDescription, ...] = ( AmcrestSensorEntityDescription( key=_AUDIO_DETECTED_KEY, @@ -111,6 +115,12 @@ BINARY_SENSORS: tuple[AmcrestSensorEntityDescription, ...] = ( device_class=BinarySensorDeviceClass.CONNECTIVITY, should_poll=True, ), + AmcrestSensorEntityDescription( + key=_DOORBELL_KEY, + name=_DOORBELL_NAME, + device_class=BinarySensorDeviceClass.OCCUPANCY, + event_code=_DOORBELL_EVENT_CODE, + ), ) BINARY_SENSOR_KEYS = [description.key for description in BINARY_SENSORS] _EXCLUSIVE_OPTIONS = [