Skip to content

Commit 5437fb6

Browse files
committed
Refactor token generation instructions in README for clarity
1 parent f48d2a4 commit 5437fb6

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,7 @@ VERIFY_SSL = True # set verify_ssl to False if you don't use the .local hostnam
8989

9090

9191
async def main() -> None:
92-
token = "" # you can set the token here for testing purposes, to re-use an earlier generated token
93-
94-
if not token:
95-
# Generate new token via Cloud API
96-
async with OverkizClient(
97-
username=USERNAME,
98-
password=PASSWORD,
99-
server=SUPPORTED_SERVERS[Server.SOMFY_EUROPE],
100-
) as client:
101-
await client.login()
102-
gateways = await client.get_gateways()
103-
104-
for gateway in gateways:
105-
token = await client.generate_local_token(gateway.id)
106-
await client.activate_local_token(
107-
gateway_id=gateway.id, token=token, label="Home Assistant/local-dev"
108-
)
109-
print(f"Token for {gateway.label} ({gateway.id}):")
110-
print(token) # save this token for future use
92+
token = "" # generate your token via the Somfy app and include it here
11193

11294
# Local Connection
11395
session = aiohttp.ClientSession(

0 commit comments

Comments
 (0)