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