Add Reolink IR brightness entity (#146717)

This commit is contained in:
starkillerOG 2025-06-13 12:50:12 +02:00 committed by GitHub
parent f0357539ad
commit ab3f11bfe7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 24 additions and 0 deletions

View File

@ -172,6 +172,9 @@
"floodlight_brightness": {
"default": "mdi:spotlight-beam"
},
"ir_brightness": {
"default": "mdi:led-off"
},
"volume": {
"default": "mdi:volume-high",
"state": {

View File

@ -122,6 +122,20 @@ NUMBER_ENTITIES = (
value=lambda api, ch: api.whiteled_brightness(ch),
method=lambda api, ch, value: api.set_whiteled(ch, brightness=int(value)),
),
ReolinkNumberEntityDescription(
key="ir_brightness",
cmd_key="208",
translation_key="ir_brightness",
entity_category=EntityCategory.CONFIG,
native_step=1,
native_min_value=0,
native_max_value=100,
supported=lambda api, ch: api.supported(ch, "ir_brightness"),
value=lambda api, ch: api.baichuan.ir_brightness(ch),
method=lambda api, ch, value: (
api.baichuan.set_status_led(ch, ir_brightness=int(value))
),
),
ReolinkNumberEntityDescription(
key="volume",
cmd_key="GetAudioCfg",

View File

@ -532,6 +532,9 @@
"floodlight_brightness": {
"name": "Floodlight turn on brightness"
},
"ir_brightness": {
"name": "Infrared light brightness"
},
"volume": {
"name": "Volume"
},

View File

@ -64,6 +64,10 @@
0,
]),
'cmd list': dict({
'208': dict({
'0': 1,
'null': 1,
}),
'296': dict({
'0': 1,
'null': 1,