From e129345e19004bd5a22a7ed9c7f0781195b22091 Mon Sep 17 00:00:00 2001 From: Ashley Gittins Date: Thu, 12 Oct 2023 03:24:07 +0000 Subject: [PATCH] (chore) linting --- custom_components/bermuda/config_flow.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/custom_components/bermuda/config_flow.py b/custom_components/bermuda/config_flow.py index 1318511..d6edbbc 100644 --- a/custom_components/bermuda/config_flow.py +++ b/custom_components/bermuda/config_flow.py @@ -103,13 +103,15 @@ async def async_step_globalopts(self, user_input=None): options = [] for service_info in bluetooth.async_discovered_service_info(self.hass, False): + devname = ( + service_info.name + or service_info.advertisement.local_name + or service_info.device.name + ) options.append( { "value": service_info.address.upper(), - "label": ( - f"[{service_info.address}]" - f"{service_info.name or service_info.advertisement.local_name or service_info.device.name}" - ), + "label": f"[{service_info.address}] {devname}", } )