Skip to content

Commit c7131ec

Browse files
committed
Add server parameter to create_local_server_config
Other brands are adding local APIs. The server parameter allows specifying which server identity to use instead of hardcoding SOMFY_DEVELOPER_MODE. Default is unchanged for backwards compat.
1 parent c629405 commit c7131ec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pyoverkiz/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212
def create_local_server_config(
1313
*,
1414
host: str,
15+
server: Server | str = Server.SOMFY_DEVELOPER_MODE,
1516
name: str = "Somfy Developer Mode",
1617
manufacturer: str = "Somfy",
1718
configuration_url: str | None = None,
1819
) -> ServerConfig:
19-
"""Generate server configuration for a local API (Somfy Developer mode)."""
20+
"""Generate server configuration for a local API."""
2021
return create_server_config(
2122
name=name,
2223
endpoint=f"https://{host}{LOCAL_API_PATH}",
2324
manufacturer=manufacturer,
24-
server=Server.SOMFY_DEVELOPER_MODE,
25+
server=server,
2526
configuration_url=configuration_url,
2627
api_type=APIType.LOCAL,
2728
)

0 commit comments

Comments
 (0)