Add Reolink speak and doorbell volume entities (#151198)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Norbert Rittel <norbert@rittel.de>
This commit is contained in:
starkillerOG
2025-08-26 19:30:14 +02:00
committed by GitHub
parent bf0bcc4c95
commit 977d4c8f01
4 changed files with 44 additions and 2 deletions

View File

@@ -181,6 +181,18 @@
"0": "mdi:volume-off" "0": "mdi:volume-off"
} }
}, },
"volume_speak": {
"default": "mdi:volume-high",
"state": {
"0": "mdi:volume-off"
}
},
"volume_doorbell": {
"default": "mdi:volume-high",
"state": {
"0": "mdi:volume-off"
}
},
"alarm_volume": { "alarm_volume": {
"default": "mdi:volume-high", "default": "mdi:volume-high",
"state": { "state": {

View File

@@ -150,6 +150,30 @@ NUMBER_ENTITIES = (
value=lambda api, ch: api.volume(ch), value=lambda api, ch: api.volume(ch),
method=lambda api, ch, value: api.set_volume(ch, volume=int(value)), method=lambda api, ch, value: api.set_volume(ch, volume=int(value)),
), ),
ReolinkNumberEntityDescription(
key="volume_speak",
cmd_key="GetAudioCfg",
translation_key="volume_speak",
entity_category=EntityCategory.CONFIG,
native_step=1,
native_min_value=0,
native_max_value=100,
supported=lambda api, ch: api.supported(ch, "volume_speek"),
value=lambda api, ch: api.volume_speek(ch),
method=lambda api, ch, value: api.set_volume(ch, volume_speek=int(value)),
),
ReolinkNumberEntityDescription(
key="volume_doorbell",
cmd_key="GetAudioCfg",
translation_key="volume_doorbell",
entity_category=EntityCategory.CONFIG,
native_step=1,
native_min_value=0,
native_max_value=100,
supported=lambda api, ch: api.supported(ch, "volume_doorbell"),
value=lambda api, ch: api.volume_doorbell(ch),
method=lambda api, ch, value: api.set_volume(ch, volume_doorbell=int(value)),
),
ReolinkNumberEntityDescription( ReolinkNumberEntityDescription(
key="guard_return_time", key="guard_return_time",
cmd_key="GetPtzGuard", cmd_key="GetPtzGuard",

View File

@@ -541,6 +541,12 @@
"volume": { "volume": {
"name": "Volume" "name": "Volume"
}, },
"volume_speak": {
"name": "Speak volume"
},
"volume_doorbell": {
"name": "Doorbell volume"
},
"alarm_volume": { "alarm_volume": {
"name": "Alarm volume" "name": "Alarm volume"
}, },

View File

@@ -98,8 +98,8 @@
'null': 1, 'null': 1,
}), }),
'GetAudioCfg': dict({ 'GetAudioCfg': dict({
'0': 2, '0': 4,
'null': 2, 'null': 4,
}), }),
'GetAutoFocus': dict({ 'GetAutoFocus': dict({
'0': 1, '0': 1,