Add Reolink privacy mask switch (#146906)

This commit is contained in:
starkillerOG 2025-06-16 14:40:19 +02:00 committed by GitHub
parent d657964729
commit 38973fe64a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 0 deletions

View File

@ -491,6 +491,12 @@
"state": { "state": {
"on": "mdi:eye-off" "on": "mdi:eye-off"
} }
},
"privacy_mask": {
"default": "mdi:eye",
"state": {
"on": "mdi:eye-off"
}
} }
} }
}, },

View File

@ -960,6 +960,9 @@
}, },
"privacy_mode": { "privacy_mode": {
"name": "Privacy mode" "name": "Privacy mode"
},
"privacy_mask": {
"name": "Privacy mask"
} }
} }
} }

View File

@ -216,6 +216,15 @@ SWITCH_ENTITIES = (
value=lambda api, ch: api.baichuan.privacy_mode(ch), value=lambda api, ch: api.baichuan.privacy_mode(ch),
method=lambda api, ch, value: api.baichuan.set_privacy_mode(ch, value), method=lambda api, ch, value: api.baichuan.set_privacy_mode(ch, value),
), ),
ReolinkSwitchEntityDescription(
key="privacy_mask",
cmd_key="GetMask",
translation_key="privacy_mask",
entity_category=EntityCategory.CONFIG,
supported=lambda api, ch: api.supported(ch, "privacy_mask"),
value=lambda api, ch: api.privacy_mask_enabled(ch),
method=lambda api, ch, value: api.set_privacy_mask(ch, enable=value),
),
ReolinkSwitchEntityDescription( ReolinkSwitchEntityDescription(
key="hardwired_chime_enabled", key="hardwired_chime_enabled",
cmd_key="483", cmd_key="483",

View File

@ -148,6 +148,10 @@
'0': 1, '0': 1,
'null': 1, 'null': 1,
}), }),
'GetMask': dict({
'0': 1,
'null': 1,
}),
'GetMdAlarm': dict({ 'GetMdAlarm': dict({
'0': 1, '0': 1,
'null': 1, 'null': 1,