mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-10-27 16:10:49 +08:00
fix: resolve hassfest validation errors and warnings (#1800)
This commit is contained in:
@@ -308,6 +308,9 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
): bool,
|
||||
}),
|
||||
errors={'base': reason},
|
||||
description_placeholders={
|
||||
'oauth_redirect_url': OAUTH_REDIRECT_URL,
|
||||
},
|
||||
last_step=False,
|
||||
)
|
||||
|
||||
@@ -417,7 +420,12 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
'http_host': (
|
||||
DEFAULT_OAUTH2_API_HOST
|
||||
if self._cloud_server == DEFAULT_CLOUD_SERVER
|
||||
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}')},
|
||||
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}'),
|
||||
'bing_url': 'https://www.bing.com',
|
||||
'oauth2_auth_url': OAUTH2_AUTH_URL,
|
||||
'spec_api_url':
|
||||
'https://miot-spec.org/miot-spec-v2/template/list/device',
|
||||
},
|
||||
last_step=False
|
||||
)
|
||||
|
||||
@@ -1183,6 +1191,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
||||
}),
|
||||
description_placeholders={
|
||||
'cloud_server': CLOUD_SERVERS[self._cloud_server],
|
||||
'oauth_redirect_url': OAUTH_REDIRECT_URL,
|
||||
},
|
||||
last_step=False,
|
||||
)
|
||||
@@ -1926,7 +1935,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
||||
'http_host': (
|
||||
DEFAULT_OAUTH2_API_HOST
|
||||
if self._cloud_server == DEFAULT_CLOUD_SERVER
|
||||
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}')},
|
||||
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}'),
|
||||
'bing_url': 'https://www.bing.com',
|
||||
'oauth2_auth_url': OAUTH2_AUTH_URL,
|
||||
'spec_api_url':
|
||||
'https://miot-spec.org/miot-spec-v2/template/list/device',
|
||||
},
|
||||
last_step=False
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user