mirror of
https://github.com/home-assistant/core.git
synced 2025-09-08 22:31:32 +02:00
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:
@@ -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": {
|
||||||
|
@@ -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",
|
||||||
|
@@ -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"
|
||||||
},
|
},
|
||||||
|
@@ -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,
|
||||||
|
Reference in New Issue
Block a user