Add Reolink day night state sensor (#140825)

* Add day night state sensor

* Update test_diagnostics.ambr
This commit is contained in:
starkillerOG 2025-03-18 10:19:45 +01:00 committed by GitHub
parent 603557af73
commit fdd36e457d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 0 deletions

View File

@ -365,6 +365,9 @@
"battery_state": {
"default": "mdi:battery-charging"
},
"day_night_state": {
"default": "mdi:theme-light-dark"
},
"wifi_signal": {
"default": "mdi:wifi"
},

View File

@ -107,6 +107,17 @@ SENSORS = (
value=lambda api, ch: BatteryEnum(api.battery_status(ch)).name,
supported=lambda api, ch: api.supported(ch, "battery"),
),
ReolinkSensorEntityDescription(
key="day_night_state",
cmd_id=33,
cmd_key="296",
translation_key="day_night_state",
device_class=SensorDeviceClass.ENUM,
entity_category=EntityCategory.DIAGNOSTIC,
options=["day", "night", "led_day"],
value=lambda api, ch: api.baichuan.day_night_state(ch),
supported=lambda api, ch: api.supported(ch, "day_night_state"),
),
)
HOST_SENSORS = (

View File

@ -825,6 +825,14 @@
"chargecomplete": "Charge complete"
}
},
"day_night_state": {
"name": "Day night state",
"state": {
"day": "Color",
"night": "Black & white",
"led_day": "Color with floodlight"
}
},
"hdd_storage": {
"name": "HDD {hdd_index} storage"
},

View File

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