mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Add Reolink post recording time select entity (#149201)
Co-authored-by: Norbert Rittel <norbert@rittel.de>
This commit is contained in:
parent
b6014da121
commit
ecb6cc50b9
@ -389,6 +389,9 @@
|
||||
},
|
||||
"packing_time": {
|
||||
"default": "mdi:record-rec"
|
||||
},
|
||||
"post_rec_time": {
|
||||
"default": "mdi:record-rec"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
|
@ -250,6 +250,17 @@ SELECT_ENTITIES = (
|
||||
value=lambda api, ch: str(api.bit_rate(ch, "sub")),
|
||||
method=lambda api, ch, value: api.set_bit_rate(ch, int(value), "sub"),
|
||||
),
|
||||
ReolinkSelectEntityDescription(
|
||||
key="post_rec_time",
|
||||
cmd_key="GetRec",
|
||||
translation_key="post_rec_time",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
entity_registry_enabled_default=False,
|
||||
get_options=lambda api, ch: api.post_recording_time_list(ch),
|
||||
supported=lambda api, ch: api.supported(ch, "post_rec_time"),
|
||||
value=lambda api, ch: api.post_recording_time(ch),
|
||||
method=lambda api, ch, value: api.set_post_recording_time(ch, value),
|
||||
),
|
||||
)
|
||||
|
||||
HOST_SELECT_ENTITIES = (
|
||||
|
@ -857,6 +857,9 @@
|
||||
},
|
||||
"packing_time": {
|
||||
"name": "Recording packing time"
|
||||
},
|
||||
"post_rec_time": {
|
||||
"name": "Post-recording time"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
|
@ -125,6 +125,7 @@ def _init_host_mock(host_mock: MagicMock) -> None:
|
||||
host_mock.wifi_connection = False
|
||||
host_mock.wifi_signal.return_value = -45
|
||||
host_mock.whiteled_mode_list.return_value = []
|
||||
host_mock.post_recording_time_list.return_value = []
|
||||
host_mock.zoom_range.return_value = {
|
||||
"zoom": {"pos": {"min": 0, "max": 100}},
|
||||
"focus": {"pos": {"min": 0, "max": 100}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user