Reolink auto quick reply (#89656)

This commit is contained in:
starkillerOG 2023-03-15 12:56:01 +01:00 committed by GitHub
parent 6270776fbb
commit 6a01c3369d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 0 deletions

View file

@ -67,6 +67,18 @@ SELECT_ENTITIES = (
supported=lambda api, ch: api.supported(ch, "ptz_presets"),
method=lambda api, ch, name: api.set_ptz_command(ch, preset=name),
),
ReolinkSelectEntityDescription(
key="auto_quick_reply_message",
name="Auto quick reply message",
icon="mdi:message-reply-text-outline",
translation_key="auto_quick_reply_message",
get_options=lambda api, ch: list(api.quick_reply_dict(ch).values()),
supported=lambda api, ch: api.supported(ch, "quick_reply"),
value=lambda api, ch: api.quick_reply_dict(ch)[api.quick_reply_file(ch)],
method=lambda api, ch, mess: api.set_quick_reply(
ch, file_id=[k for k, v in api.quick_reply_dict(ch).items() if v == mess][0]
),
),
)