mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Add Reolink recording packing time (#142847)
This commit is contained in:
parent
e418491f19
commit
cf1cbc6d75
@ -380,6 +380,9 @@
|
|||||||
},
|
},
|
||||||
"scene_mode": {
|
"scene_mode": {
|
||||||
"default": "mdi:view-list"
|
"default": "mdi:view-list"
|
||||||
|
},
|
||||||
|
"packing_time": {
|
||||||
|
"default": "mdi:record-rec"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
|
@ -263,6 +263,17 @@ HOST_SELECT_ENTITIES = (
|
|||||||
value=lambda api: api.baichuan.active_scene,
|
value=lambda api: api.baichuan.active_scene,
|
||||||
method=lambda api, name: api.baichuan.set_scene(scene_name=name),
|
method=lambda api, name: api.baichuan.set_scene(scene_name=name),
|
||||||
),
|
),
|
||||||
|
ReolinkHostSelectEntityDescription(
|
||||||
|
key="packing_time",
|
||||||
|
cmd_key="GetRec",
|
||||||
|
translation_key="packing_time",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
|
get_options=lambda api: api.recording_packing_time_list,
|
||||||
|
supported=lambda api: api.supported(None, "pak_time"),
|
||||||
|
value=lambda api: api.recording_packing_time,
|
||||||
|
method=lambda api, value: api.set_recording_packing_time(value),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
CHIME_SELECT_ENTITIES = (
|
CHIME_SELECT_ENTITIES = (
|
||||||
|
@ -845,6 +845,9 @@
|
|||||||
"home": "[%key:common::state::home%]",
|
"home": "[%key:common::state::home%]",
|
||||||
"away": "[%key:common::state::not_home%]"
|
"away": "[%key:common::state::not_home%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"packing_time": {
|
||||||
|
"name": "Recording packing time"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
|
@ -138,6 +138,8 @@ def reolink_connect_class() -> Generator[MagicMock]:
|
|||||||
host_mock.daynight_state.return_value = "Black&White"
|
host_mock.daynight_state.return_value = "Black&White"
|
||||||
host_mock.hub_alarm_tone_id.return_value = 1
|
host_mock.hub_alarm_tone_id.return_value = 1
|
||||||
host_mock.hub_visitor_tone_id.return_value = 1
|
host_mock.hub_visitor_tone_id.return_value = 1
|
||||||
|
host_mock.recording_packing_time_list = ["30 Minutes", "60 Minutes"]
|
||||||
|
host_mock.recording_packing_time = "60 Minutes"
|
||||||
|
|
||||||
# Baichuan
|
# Baichuan
|
||||||
host_mock.baichuan = create_autospec(Baichuan)
|
host_mock.baichuan = create_autospec(Baichuan)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user