mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Clean up code for onewire config flow (#67970)
* Change debug level of integration reload after config update to debug * Remove extra .keys() call for dict itreation * Remove unecessary type check * Remove unused LOGGER reference
This commit is contained in:
parent
ef71ab04ad
commit
7615f138d9
@ -47,5 +47,5 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
||||
|
||||
async def options_update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||
"""Handle options update."""
|
||||
_LOGGER.info("Configuration options updated, reloading OneWire integration")
|
||||
_LOGGER.debug("Configuration options updated, reloading OneWire integration")
|
||||
await hass.config_entries.async_reload(entry.entry_id)
|
||||
|
@ -1,7 +1,6 @@
|
||||
"""Config flow for 1-Wire component."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
@ -47,9 +46,6 @@ DATA_SCHEMA_MOUNTDIR = vol.Schema(
|
||||
)
|
||||
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def validate_input_owserver(
|
||||
hass: HomeAssistant, data: dict[str, Any]
|
||||
) -> dict[str, str]:
|
||||
@ -255,7 +251,7 @@ class OnewireOptionsFlowHandler(OptionsFlow):
|
||||
default=self._get_current_configured_sensors(),
|
||||
description="Multiselect with list of devices to choose from",
|
||||
): cv.multi_select(
|
||||
{device: False for device in self.configurable_devices.keys()}
|
||||
{device: False for device in self.configurable_devices}
|
||||
),
|
||||
}
|
||||
),
|
||||
@ -273,8 +269,6 @@ class OnewireOptionsFlowHandler(OptionsFlow):
|
||||
return await self._update_options()
|
||||
|
||||
self.current_device, description = self.devices_to_configure.popitem()
|
||||
data_schema: vol.Schema
|
||||
if description.family == "28":
|
||||
data_schema = vol.Schema(
|
||||
{
|
||||
vol.Required(
|
||||
|
Loading…
x
Reference in New Issue
Block a user