Home Assistant Unofficial Reference 2024.12.1
helpers.py
Go to the documentation of this file.
1 """Helpers for zwave_me config flow."""
2 
3 from __future__ import annotations
4 
5 from zwave_me_ws import ZWaveMe
6 
7 
8 async def get_uuid(url: str, token: str | None = None) -> str | None:
9  """Get an uuid from Z-Wave-Me."""
10  conn = ZWaveMe(url=url, token=token)
11  uuid = None
12  if await conn.get_connection():
13  uuid = await conn.get_uuid()
14  await conn.close_ws()
15  return uuid
str|None get_uuid(str url, str|None token=None)
Definition: helpers.py:8