Use name in ESPHome discovery title (#24100)

* Use name in ESPHome discovery title

* Add test

* Lint
This commit is contained in:
Otto Winter authored and Pascal Vizeli committed 2019-05-26 13:48:05 +02:00
1 parent 0194905e97
commit 9438dd1cbd
3 files changed
+24 -18

No files matched your search

@@ -50,6 +50,11 @@ class EsphomeFlowHandler(config_entries.ConfigFlow):
if error is not None:
return await self.async_step_user(error=error)
self._name = device_info.name
# pylint: disable=unsupported-assignment-operation
self.context['title_placeholders'] = {
'name': self._name
}
# Only show authentication step if device uses password
if device_info.uses_password:
return await self.async_step_authenticate()