mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add Reolink binning mode select entity (#131570)
This commit is contained in:
parent
0e88e22fd2
commit
a2ebfe6e83
@ -222,6 +222,9 @@
|
||||
"hdr": {
|
||||
"default": "mdi:hdr"
|
||||
},
|
||||
"binning_mode": {
|
||||
"default": "mdi:code-block-brackets"
|
||||
},
|
||||
"hub_alarm_ringtone": {
|
||||
"default": "mdi:music-note",
|
||||
"state": {
|
||||
|
@ -8,6 +8,7 @@ import logging
|
||||
from typing import Any
|
||||
|
||||
from reolink_aio.api import (
|
||||
BinningModeEnum,
|
||||
Chime,
|
||||
ChimeToneEnum,
|
||||
DayNightEnum,
|
||||
@ -175,6 +176,19 @@ 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="binning_mode",
|
||||
cmd_key="GetIsp",
|
||||
translation_key="binning_mode",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
entity_registry_enabled_default=False,
|
||||
get_options=[method.name for method in BinningModeEnum],
|
||||
supported=lambda api, ch: api.supported(ch, "binning_mode"),
|
||||
value=lambda api, ch: BinningModeEnum(api.binning_mode(ch)).name,
|
||||
method=lambda api, ch, name: api.set_binning_mode(
|
||||
ch, BinningModeEnum[name].value
|
||||
),
|
||||
),
|
||||
ReolinkSelectEntityDescription(
|
||||
key="main_frame_rate",
|
||||
cmd_key="GetEnc",
|
||||
|
@ -490,7 +490,7 @@
|
||||
"name": "Floodlight mode",
|
||||
"state": {
|
||||
"off": "[%key:common::state::off%]",
|
||||
"auto": "Auto",
|
||||
"auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]",
|
||||
"onatnight": "On at night",
|
||||
"schedule": "Schedule",
|
||||
"adaptive": "Adaptive",
|
||||
@ -529,7 +529,7 @@
|
||||
"name": "Doorbell LED",
|
||||
"state": {
|
||||
"stayoff": "Stay off",
|
||||
"auto": "Auto",
|
||||
"auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]",
|
||||
"alwaysonatnight": "Auto & always on at night",
|
||||
"alwayson": "Always on"
|
||||
}
|
||||
@ -539,7 +539,15 @@
|
||||
"state": {
|
||||
"off": "[%key:common::state::off%]",
|
||||
"on": "[%key:common::state::on%]",
|
||||
"auto": "Auto"
|
||||
"auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]"
|
||||
}
|
||||
},
|
||||
"binning_mode": {
|
||||
"name": "Binning mode",
|
||||
"state": {
|
||||
"off": "[%key:common::state::off%]",
|
||||
"on": "[%key:common::state::on%]",
|
||||
"auto": "[%key:component::reolink::entity::select::day_night_mode::state::auto%]"
|
||||
}
|
||||
},
|
||||
"hub_alarm_ringtone": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user