From a51bbe9a661e4adbf8007a0cc344eef1872666a7 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Wed, 8 Nov 2023 01:11:44 +0100 Subject: [PATCH] Add HDR switch to Reolink (#103550) --- homeassistant/components/reolink/strings.json | 3 +++ homeassistant/components/reolink/switch.py | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index 15ba4baed45..0a496d62522 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -309,6 +309,9 @@ }, "doorbell_button_sound": { "name": "Doorbell button sound" + }, + "hdr": { + "name": "HDR" } } } diff --git a/homeassistant/components/reolink/switch.py b/homeassistant/components/reolink/switch.py index 4bc817f9c52..f07db00e720 100644 --- a/homeassistant/components/reolink/switch.py +++ b/homeassistant/components/reolink/switch.py @@ -152,6 +152,16 @@ SWITCH_ENTITIES = ( value=lambda api, ch: api.doorbell_button_sound(ch), method=lambda api, ch, value: api.set_volume(ch, doorbell_button_sound=value), ), + ReolinkSwitchEntityDescription( + key="hdr", + translation_key="hdr", + icon="mdi:hdr", + entity_category=EntityCategory.CONFIG, + entity_registry_enabled_default=False, + supported=lambda api, ch: api.supported(ch, "HDR"), + value=lambda api, ch: api.HDR_on(ch) is True, + method=lambda api, ch, value: api.set_HDR(ch, value), + ), ) NVR_SWITCH_ENTITIES = (