From 59ea6f375ab189450d1065686f545024b411090f Mon Sep 17 00:00:00 2001 From: Lennart Nederstigt Date: Wed, 28 May 2025 17:10:38 +0200 Subject: [PATCH] Add hardwired chime toggle to Reolink Battery Doorbell (#145779) Co-authored-by: starkillerOG --- homeassistant/components/reolink/icons.json | 6 ++++++ homeassistant/components/reolink/strings.json | 3 +++ homeassistant/components/reolink/switch.py | 10 ++++++++++ 3 files changed, 19 insertions(+) diff --git a/homeassistant/components/reolink/icons.json b/homeassistant/components/reolink/icons.json index 7df82dfc512..fef175457f7 100644 --- a/homeassistant/components/reolink/icons.json +++ b/homeassistant/components/reolink/icons.json @@ -462,6 +462,12 @@ "doorbell_button_sound": { "default": "mdi:volume-high" }, + "hardwired_chime_enabled": { + "default": "mdi:bell", + "state": { + "off": "mdi:bell-off" + } + }, "hdr": { "default": "mdi:hdr" }, diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index 94d2ee3cf27..d1d51d9229a 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -910,6 +910,9 @@ "auto_focus": { "name": "Auto focus" }, + "hardwired_chime_enabled": { + "name": "Hardwired chime enabled" + }, "guard_return": { "name": "Guard return" }, diff --git a/homeassistant/components/reolink/switch.py b/homeassistant/components/reolink/switch.py index af87a75eece..d9f192a3faa 100644 --- a/homeassistant/components/reolink/switch.py +++ b/homeassistant/components/reolink/switch.py @@ -216,6 +216,16 @@ SWITCH_ENTITIES = ( value=lambda api, ch: api.baichuan.privacy_mode(ch), method=lambda api, ch, value: api.baichuan.set_privacy_mode(ch, value), ), + ReolinkSwitchEntityDescription( + key="hardwired_chime_enabled", + cmd_key="483", + translation_key="hardwired_chime_enabled", + entity_category=EntityCategory.CONFIG, + entity_registry_enabled_default=False, + supported=lambda api, ch: api.supported(ch, "hardwired_chime"), + value=lambda api, ch: api.baichuan.hardwired_chime_enabled(ch), + method=lambda api, ch, value: api.baichuan.set_ding_dong_ctrl(ch, enable=value), + ), ) NVR_SWITCH_ENTITIES = (