Reolink auto quick reply (#89656)
This commit is contained in:
parent
6270776fbb
commit
6a01c3369d
3 changed files with 30 additions and 0 deletions
|
@ -175,6 +175,19 @@ NUMBER_ENTITIES = (
|
||||||
value=lambda api, ch: api.ai_sensitivity(ch, "dog_cat"),
|
value=lambda api, ch: api.ai_sensitivity(ch, "dog_cat"),
|
||||||
method=lambda api, ch, value: api.set_ai_sensitivity(ch, int(value), "dog_cat"),
|
method=lambda api, ch, value: api.set_ai_sensitivity(ch, int(value), "dog_cat"),
|
||||||
),
|
),
|
||||||
|
ReolinkNumberEntityDescription(
|
||||||
|
key="auto_quick_reply_time",
|
||||||
|
name="Auto quick reply time",
|
||||||
|
icon="mdi:message-reply-text-outline",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
native_step=1,
|
||||||
|
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||||
|
native_min_value=1,
|
||||||
|
native_max_value=60,
|
||||||
|
supported=lambda api, ch: api.supported(ch, "quick_reply"),
|
||||||
|
value=lambda api, ch: api.quick_reply_time(ch),
|
||||||
|
method=lambda api, ch, value: api.set_quick_reply(ch, time=int(value)),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,18 @@ SELECT_ENTITIES = (
|
||||||
supported=lambda api, ch: api.supported(ch, "ptz_presets"),
|
supported=lambda api, ch: api.supported(ch, "ptz_presets"),
|
||||||
method=lambda api, ch, name: api.set_ptz_command(ch, preset=name),
|
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]
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,11 @@
|
||||||
"color": "Color",
|
"color": "Color",
|
||||||
"blackwhite": "Black&White"
|
"blackwhite": "Black&White"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"auto_quick_reply_message": {
|
||||||
|
"state": {
|
||||||
|
"off": "Off"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue