Skip to content

Commit 967c5be

Browse files
committed
Formatting fixes
1 parent 6ec9fe2 commit 967c5be

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

custom_components/http_agent/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
5555
# Store coordinator and setup platforms info
5656
hass.data[DOMAIN][entry.entry_id] = {
5757
"coordinator": coordinator,
58-
"platforms": list(needed_platforms)
58+
"platforms": list(needed_platforms),
5959
}
6060

6161
# Set up only needed platforms
@@ -86,7 +86,9 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
8686

8787
# Only unload platforms that were actually set up for this entry
8888
if setup_platforms:
89-
unload_ok = await hass.config_entries.async_unload_platforms(entry, setup_platforms)
89+
unload_ok = await hass.config_entries.async_unload_platforms(
90+
entry, setup_platforms
91+
)
9092
else:
9193
unload_ok = True
9294

custom_components/http_agent/config_flow.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,15 @@ async def async_step_sensors(
201201

202202
# Create unique ID based on URL including query parameters
203203
parsed_url = urlparse(self.data[CONF_URL])
204-
unique_id = f"{parsed_url.netloc}{parsed_url.path}{parsed_url.query}".replace(
205-
"/", "_"
206-
).replace(".", "_").replace("?", "_").replace("&", "_").replace("=", "_")
204+
unique_id = (
205+
f"{parsed_url.netloc}{parsed_url.path}{parsed_url.query}".replace(
206+
"/", "_"
207+
)
208+
.replace(".", "_")
209+
.replace("?", "_")
210+
.replace("&", "_")
211+
.replace("=", "_")
212+
)
207213

208214
await self.async_set_unique_id(unique_id)
209215
self._abort_if_unique_id_configured()

0 commit comments

Comments
 (0)