mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add Reolink IR brightness entity (#146717)
This commit is contained in:
parent
f0357539ad
commit
ab3f11bfe7
@ -172,6 +172,9 @@
|
||||
"floodlight_brightness": {
|
||||
"default": "mdi:spotlight-beam"
|
||||
},
|
||||
"ir_brightness": {
|
||||
"default": "mdi:led-off"
|
||||
},
|
||||
"volume": {
|
||||
"default": "mdi:volume-high",
|
||||
"state": {
|
||||
|
@ -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",
|
||||
|
@ -532,6 +532,9 @@
|
||||
"floodlight_brightness": {
|
||||
"name": "Floodlight turn on brightness"
|
||||
},
|
||||
"ir_brightness": {
|
||||
"name": "Infrared light brightness"
|
||||
},
|
||||
"volume": {
|
||||
"name": "Volume"
|
||||
},
|
||||
|
@ -64,6 +64,10 @@
|
||||
0,
|
||||
]),
|
||||
'cmd list': dict({
|
||||
'208': dict({
|
||||
'0': 1,
|
||||
'null': 1,
|
||||
}),
|
||||
'296': dict({
|
||||
'0': 1,
|
||||
'null': 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user