Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed Dec 9, 2023
1 parent 68b4741 commit 6659ca9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/airmx/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
_LOGGER = logging.getLogger(__name__)

ADDON_HOSTNAME = "a06532c7-airmx-addon"
ADDON_MQTT_PORT = 25883
DEFAULT_MQTT_PORT = 1883


@dataclass
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6659ca9

Please sign in to comment.