mirror of
https://github.com/home-assistant/core.git
synced 2026-05-08 17:49:37 +01:00
Add Reolink exposure mode select entity (#155759)
This commit is contained in:
@@ -366,6 +366,9 @@
|
||||
"day_night_mode": {
|
||||
"default": "mdi:theme-light-dark"
|
||||
},
|
||||
"exposure": {
|
||||
"default": "mdi:camera-iris"
|
||||
},
|
||||
"floodlight_event_mode": {
|
||||
"default": "mdi:spotlight-beam"
|
||||
},
|
||||
|
||||
@@ -13,6 +13,7 @@ from reolink_aio.api import (
|
||||
ChimeToneEnum,
|
||||
DayNightEnum,
|
||||
EncodingEnum,
|
||||
ExposureEnum,
|
||||
HDREnum,
|
||||
Host,
|
||||
HubToneEnum,
|
||||
@@ -208,6 +209,17 @@ SELECT_ENTITIES = (
|
||||
value=lambda api, ch: HDREnum(api.HDR_state(ch)).name,
|
||||
method=lambda api, ch, name: api.set_HDR(ch, HDREnum[name].value),
|
||||
),
|
||||
ReolinkSelectEntityDescription(
|
||||
key="exposure",
|
||||
cmd_key="GetIsp",
|
||||
translation_key="exposure",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
entity_registry_enabled_default=False,
|
||||
get_options=[method.name for method in ExposureEnum],
|
||||
supported=lambda api, ch: api.supported(ch, "exposure"),
|
||||
value=lambda api, ch: ExposureEnum(api.exposure(ch)).name,
|
||||
method=lambda api, ch, name: api.set_exposure(ch, ExposureEnum[name].value),
|
||||
),
|
||||
ReolinkSelectEntityDescription(
|
||||
key="binning_mode",
|
||||
cmd_key="GetIsp",
|
||||
|
||||
@@ -604,6 +604,15 @@
|
||||
"stayoff": "Stay off"
|
||||
}
|
||||
},
|
||||
"exposure": {
|
||||
"name": "Image exposure mode",
|
||||
"state": {
|
||||
"antismearing": "Anti-smearing",
|
||||
"auto": "[%key:common::state::auto%]",
|
||||
"lownoise": "Low noise",
|
||||
"manual": "Manual"
|
||||
}
|
||||
},
|
||||
"floodlight_event_mode": {
|
||||
"name": "Floodlight event mode",
|
||||
"state": {
|
||||
|
||||
Reference in New Issue
Block a user