Set placeholders in homekit config flow title (#23311)

This commit is contained in:
Jc2k 2019-04-23 05:32:39 +01:00 committed by Paulus Schoutsen
parent ee88433fb1
commit baeb3cddc6
3 changed files with 68 additions and 41 deletions

View file

@ -130,6 +130,11 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow):
status_flags = int(properties['sf'])
paired = not status_flags & 0x01
# pylint: disable=unsupported-assignment-operation
self.context['title_placeholders'] = {
'name': discovery_info['name'],
}
# The configuration number increases every time the characteristic map
# needs updating. Some devices use a slightly off-spec name so handle
# both cases.

View file

@ -1,6 +1,7 @@
{
"config": {
"title": "HomeKit Accessory",
"flow_title": "HomeKit Accessory: {name}",
"step": {
"user": {
"title": "Pair with HomeKit Accessory",