Add Reolink day night switch threshold (#104219)

This commit is contained in:
starkillerOG 2023-11-19 20:46:03 +01:00 committed by GitHub
parent 173f4760bc
commit a1678ebd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -298,6 +298,19 @@ NUMBER_ENTITIES = (
value=lambda api, ch: api.auto_track_stop_time(ch),
method=lambda api, ch, value: api.set_auto_tracking(ch, stop_time=int(value)),
),
ReolinkNumberEntityDescription(
key="day_night_switch_threshold",
translation_key="day_night_switch_threshold",
icon="mdi:theme-light-dark",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
native_step=1,
native_min_value=0,
native_max_value=100,
supported=lambda api, ch: api.supported(ch, "dayNightThreshold"),
value=lambda api, ch: api.daynight_threshold(ch),
method=lambda api, ch, value: api.set_daynight_threshold(ch, int(value)),
),
)

View File

@ -215,6 +215,9 @@
},
"auto_track_stop_time": {
"name": "Auto track stop time"
},
"day_night_switch_threshold": {
"name": "Day night switch threshold"
}
},
"select": {