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