From 6659ca9413a109cfc0536c77c37556e749171c73 Mon Sep 17 00:00:00 2001 From: Artem Sorokin Date: Sat, 9 Dec 2023 23:43:43 +0300 Subject: [PATCH] Initial commit --- custom_components/airmx/config_flow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/airmx/config_flow.py b/custom_components/airmx/config_flow.py index b70ae47..cc7f2f7 100644 --- a/custom_components/airmx/config_flow.py +++ b/custom_components/airmx/config_flow.py @@ -21,7 +21,7 @@ _LOGGER = logging.getLogger(__name__) ADDON_HOSTNAME = "a06532c7-airmx-addon" -ADDON_MQTT_PORT = 25883 +DEFAULT_MQTT_PORT = 1883 @dataclass @@ -116,7 +116,7 @@ async def async_step_select_model(self, user_input: ConfigType | None = None) -> CONF_MODEL: device.model, CONF_SIGN_KEY: device.sign_key, CONF_MQTT_HOST: ADDON_HOSTNAME, - CONF_MQTT_PORT: ADDON_MQTT_PORT, + CONF_MQTT_PORT: DEFAULT_MQTT_PORT, } ) return self._create_or_update_config_entry(self._data) @@ -138,7 +138,7 @@ async def async_step_manual(self, user_input: ConfigType | None = None) -> data_ vol.Required(CONF_ID): cv.positive_int, vol.Required(CONF_SIGN_KEY): cv.string, vol.Required(CONF_MQTT_HOST, default=ADDON_HOSTNAME): cv.string, - vol.Required(CONF_MQTT_PORT, default=ADDON_MQTT_PORT): cv.positive_int, + vol.Required(CONF_MQTT_PORT, default=DEFAULT_MQTT_PORT): cv.positive_int, } ) return self.async_show_form(step_id="manual", data_schema=schema)