Skip to content

Commit

Permalink
Code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl committed Jan 7, 2024
1 parent e9291aa commit 4aeab30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/sagemcom_fast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions custom_components/sagemcom_fast/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 4aeab30

Please sign in to comment.