diff --git a/custom_components/sagemcom_fast/__init__.py b/custom_components/sagemcom_fast/__init__.py index f2dec9a..b39f60b 100644 --- a/custom_components/sagemcom_fast/__init__.py +++ b/custom_components/sagemcom_fast/__init__.py @@ -46,7 +46,7 @@ class HomeAssistantSagemcomFastData: gateway: GatewayDeviceInfo -async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry): +async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: """Set up Sagemcom F@st from a config entry.""" host = entry.data[CONF_HOST] username = entry.data[CONF_USERNAME] @@ -132,7 +132,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: return unload_ok -async def update_listener(hass: HomeAssistant, entry: ConfigEntry): +async def update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None: """Update when entry options update.""" if entry.options[CONF_SCAN_INTERVAL]: data: HomeAssistantSagemcomFastData = hass.data[DOMAIN][entry.entry_id] diff --git a/custom_components/sagemcom_fast/config_flow.py b/custom_components/sagemcom_fast/config_flow.py index b73c989..4b64225 100644 --- a/custom_components/sagemcom_fast/config_flow.py +++ b/custom_components/sagemcom_fast/config_flow.py @@ -79,6 +79,7 @@ async def async_step_user(self, user_input=None): errors = {} if user_input: + # TODO change to gateway mac address or something more unique await self.async_set_unique_id(user_input.get(CONF_HOST)) self._abort_if_unique_id_configured()