diff --git a/somfyProtect2Mqtt/docker-compose.yml b/somfyProtect2Mqtt/docker-compose.yml index d3482e8..fc9c648 100644 --- a/somfyProtect2Mqtt/docker-compose.yml +++ b/somfyProtect2Mqtt/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: somfyprotect2mqtt: build: . - image: somfyprotect2mqtt:v0.2.4 + image: somfyprotect2mqtt:v0.2.5 volumes: - ./config:/config diff --git a/somfyProtect2Mqtt/main.py b/somfyProtect2Mqtt/main.py index a2cc8c0..a51d862 100755 --- a/somfyProtect2Mqtt/main.py +++ b/somfyProtect2Mqtt/main.py @@ -14,7 +14,7 @@ from somfy_protect.api import SomfyProtectApi from somfy_protect.websocket import SomfyProtectWebsocket -VERSION = "0.2.4" +VERSION = "0.2.5" def somfy_protect_loop(somfy_protect_2_mqtt): @@ -39,12 +39,8 @@ def somfy_protect_wss_loop(somfy_protect_websocket): # Read Arguments PARSER = argparse.ArgumentParser() - PARSER.add_argument( - "--verbose", "-v", action="store_true", help="verbose mode" - ) - PARSER.add_argument( - "--configuration", "-c", type=str, help="config file path" - ) + PARSER.add_argument("--verbose", "-v", action="store_true", help="verbose mode") + PARSER.add_argument("--configuration", "-c", type=str, help="config file path") ARGS = PARSER.parse_args() DEBUG = ARGS.verbose CONFIG_FILE = ARGS.configuration @@ -59,14 +55,10 @@ def somfy_protect_wss_loop(somfy_protect_websocket): SSO = init_sso(config=CONFIG) API = SomfyProtectApi(sso=SSO) MQTT_CLIENT = init_mqtt(config=CONFIG, api=API) - WSS = SomfyProtectWebsocket( - sso=SSO, debug=DEBUG, config=CONFIG, mqtt_client=MQTT_CLIENT, api=API - ) + WSS = SomfyProtectWebsocket(sso=SSO, debug=DEBUG, config=CONFIG, mqtt_client=MQTT_CLIENT, api=API) try: - SOMFY_PROTECT = SomfyProtect2Mqtt( - api=API, mqtt_client=MQTT_CLIENT, config=CONFIG - ) + SOMFY_PROTECT = SomfyProtect2Mqtt(api=API, mqtt_client=MQTT_CLIENT, config=CONFIG) except SomfyProtectInitError as exp: LOGGER.error(f"Unable to init: {exp}")