feat: option flow support network detect config

This commit is contained in:
sworld 2024-12-29 19:43:16 +08:00
parent 0afb1455f6
commit 7839a674ac
14 changed files with 561 additions and 206 deletions

View File

@ -47,10 +47,12 @@ Config flow for Xiaomi Home.
"""
import asyncio
import hashlib
import ipaddress
import json
import secrets
import traceback
from typing import Optional, Set
from urllib.parse import urlparse
from aiohttp import web
from aiohttp.hdrs import METH_GET
import voluptuous as vol
@ -107,8 +109,9 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
_mips_service: MipsService
_miot_storage: MIoTStorage
_miot_i18n: MIoTI18n
_miot_oauth: Optional[MIoTOauthClient]
_miot_http: Optional[MIoTHttpClient]
_integration_language: str
_storage_path: str
_virtual_did: str
_uid: str
@ -119,28 +122,28 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
_hide_non_standard_entities: bool
_display_devices_changed_notify: list[str]
_cloud_server: str
_integration_language: str
_auth_info: dict
_nick_name: str
_home_selected: dict
_devices_filter: dict
_home_info_buffer: dict
_home_list_show: dict
_device_list_sorted: dict
_cloud_server: str
_oauth_redirect_url_full: str
_miot_oauth: Optional[MIoTOauthClient]
_miot_http: Optional[MIoTHttpClient]
_user_cert_state: bool
_oauth_auth_url: str
_task_oauth: Optional[asyncio.Task[None]]
_config_error_reason: Optional[str]
_fut_oauth_code: Optional[asyncio.Future]
# Config cache
_cc_home_info: dict
_cc_home_list_show: dict
_cc_network_detect_addr: str
_cc_oauth_auth_url: str
_cc_user_cert_done: bool
_cc_task_oauth: Optional[asyncio.Task[None]]
_cc_config_rc: Optional[str]
_cc_fut_oauth_code: Optional[asyncio.Future]
def __init__(self) -> None:
self._main_loop = asyncio.get_running_loop()
self._cloud_server = DEFAULT_CLOUD_SERVER
self._integration_language = DEFAULT_INTEGRATION_LANGUAGE
self._storage_path = ''
self._virtual_did = ''
@ -154,20 +157,20 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self._auth_info = {}
self._nick_name = DEFAULT_NICK_NAME
self._home_selected = {}
self._home_info_buffer = {}
self._home_list_show = {}
self._devices_filter = {}
self._device_list_sorted = {}
self._cloud_server = DEFAULT_CLOUD_SERVER
self._oauth_redirect_url_full = ''
self._miot_oauth = None
self._miot_http = None
self._user_cert_state = False
self._oauth_auth_url = ''
self._task_oauth = None
self._config_error_reason = None
self._fut_oauth_code = None
self._cc_home_info = {}
self._cc_home_list_show = {}
self._cc_network_detect_addr = ''
self._cc_oauth_auth_url = ''
self._cc_user_cert_done = False
self._cc_task_oauth = None
self._cc_config_rc = None
self._cc_fut_oauth_code = None
async def async_step_user(
self, user_input: Optional[dict] = None
@ -178,23 +181,6 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self.hass.data[DOMAIN].setdefault(self._virtual_did, {})
if not self._storage_path:
self._storage_path = self.hass.config.path('.storage', DOMAIN)
# MIoT network
self._miot_network = self.hass.data[DOMAIN].get('miot_network', None)
if not self._miot_network:
self._miot_network = MIoTNetwork(loop=self._main_loop)
self.hass.data[DOMAIN]['miot_network'] = self._miot_network
await self._miot_network.init_async(
refresh_interval=NETWORK_REFRESH_INTERVAL)
_LOGGER.info('async_step_user, create miot network')
# Mips server
self._mips_service = self.hass.data[DOMAIN].get('mips_service', None)
if not self._mips_service:
aiozc: HaAsyncZeroconf = await zeroconf.async_get_async_instance(
self.hass)
self._mips_service = MipsService(aiozc=aiozc, loop=self._main_loop)
self.hass.data[DOMAIN]['mips_service'] = self._mips_service
await self._mips_service.init_async()
_LOGGER.info('async_step_user, create mips service')
# MIoT storage
self._miot_storage = self.hass.data[DOMAIN].get('miot_storage', None)
if not self._miot_storage:
@ -203,11 +189,32 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self.hass.data[DOMAIN]['miot_storage'] = self._miot_storage
_LOGGER.info(
'async_step_user, create miot storage, %s', self._storage_path)
# Check network
if not await self._miot_network.get_network_status_async(timeout=5):
raise AbortFlow(reason='network_connect_error',
description_placeholders={})
# MIoT network
network_detect_addr = (await self._miot_storage.load_user_config_async(
uid='global_config', cloud_server='all',
keys=['network_detect_addr'])).get('network_detect_addr', {})
self._cc_network_detect_addr = ','.join(
network_detect_addr.get('ip', [])
+ network_detect_addr.get('url', []))
self._miot_network = self.hass.data[DOMAIN].get('miot_network', None)
if not self._miot_network:
self._miot_network = MIoTNetwork(
ip_addr_list=network_detect_addr.get('ip', []),
url_addr_list=network_detect_addr.get('url', []),
refresh_interval=NETWORK_REFRESH_INTERVAL,
loop=self._main_loop)
self.hass.data[DOMAIN]['miot_network'] = self._miot_network
await self._miot_network.init_async()
_LOGGER.info('async_step_user, create miot network')
# MIPS service
self._mips_service = self.hass.data[DOMAIN].get('mips_service', None)
if not self._mips_service:
aiozc: HaAsyncZeroconf = await zeroconf.async_get_async_instance(
self.hass)
self._mips_service = MipsService(aiozc=aiozc, loop=self._main_loop)
self.hass.data[DOMAIN]['mips_service'] = self._mips_service
await self._mips_service.init_async()
_LOGGER.info('async_step_user, create mips service')
return await self.async_step_eula(user_input)
@ -245,7 +252,66 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
webhook_id=self._virtual_did)
self._oauth_redirect_url_full = (
f'{user_input.get("oauth_redirect_url")}{webhook_path}')
self._cc_network_detect_addr = user_input.get(
'network_detect_addr', self._cc_network_detect_addr)
ip_list: list[str] = []
url_list: list[str] = []
if self._cc_network_detect_addr:
invalid_list: list[str] = []
for addr in self._cc_network_detect_addr.split(','):
addr = addr.strip()
if not addr:
continue
# pylint: disable=broad-exception-caught
try:
ipaddress.ip_address(addr)
ip_list.append(addr)
continue
except Exception:
pass
try:
result = urlparse(addr)
if (
result.netloc
and result.scheme.startswith('http')
):
url_list.append(addr)
continue
except Exception:
pass
invalid_list.append(addr)
if invalid_list:
return await self.__show_auth_config_form(
reason='invalid_network_addr')
network_detect_addr: dict = {}
if ip_list or url_list:
if ip_list and not await self._miot_network.ping_multi_async(
ip_list=ip_list):
return await self.__show_auth_config_form(
reason='invalid_ip_addr')
if url_list and not await self._miot_network.http_multi_async(
url_list=url_list):
return await self.__show_auth_config_form(
reason='invalid_http_addr')
network_detect_addr = {
'ip': ip_list, 'url': url_list}
else:
if not await self._miot_network.get_network_status_async():
return await self.__show_auth_config_form(
reason='invalid_default_addr')
network_detect_addr = {'ip': [], 'url': []}
if await self._miot_storage.update_user_config_async(
uid='global_config', cloud_server='all', config={
'network_detect_addr': network_detect_addr}):
_LOGGER.info(
'update network_detect_addr, %s', network_detect_addr)
await self._miot_network.update_addr_list_async(
ip_addr_list=ip_list, url_addr_list=url_list)
return await self.async_step_oauth(user_input)
return await self.__show_auth_config_form('')
async def __show_auth_config_form(self, reason: str):
# Generate default language from HomeAssistant config (not user config)
default_language: str = self.hass.config.language
if default_language not in INTEGRATION_LANGUAGES:
@ -268,7 +334,12 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
'oauth_redirect_url',
default=OAUTH_REDIRECT_URL # type: ignore
): vol.In([OAUTH_REDIRECT_URL]),
vol.Optional(
'network_detect_addr',
default=self._cc_network_detect_addr # type: ignore
): str,
}),
errors={'base': reason},
last_step=False,
)
@ -288,10 +359,11 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
)
state = str(secrets.randbits(64))
self.hass.data[DOMAIN][self._virtual_did]['oauth_state'] = state
self._oauth_auth_url = miot_oauth.gen_auth_url(
self._cc_oauth_auth_url = miot_oauth.gen_auth_url(
redirect_url=self._oauth_redirect_url_full, state=state)
_LOGGER.info(
'async_step_oauth, oauth_url: %s', self._oauth_auth_url)
'async_step_oauth, oauth_url: %s',
self._cc_oauth_auth_url)
webhook_async_unregister(
self.hass, webhook_id=self._virtual_did)
webhook_async_register(
@ -302,12 +374,12 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
handler=_handle_oauth_webhook,
allowed_methods=(METH_GET,),
)
self._fut_oauth_code = self.hass.data[DOMAIN][
self._cc_fut_oauth_code = self.hass.data[DOMAIN][
self._virtual_did].get('fut_oauth_code', None)
if not self._fut_oauth_code:
self._fut_oauth_code = self._main_loop.create_future()
if not self._cc_fut_oauth_code:
self._cc_fut_oauth_code = self._main_loop.create_future()
self.hass.data[DOMAIN][self._virtual_did][
'fut_oauth_code'] = self._fut_oauth_code
'fut_oauth_code'] = self._cc_fut_oauth_code
_LOGGER.info(
'async_step_oauth, webhook.async_register: %s',
self._virtual_did)
@ -318,13 +390,13 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
return self.async_show_progress_done(next_step_id='oauth_error')
# 2: show OAuth2 loading page
if self._task_oauth is None:
self._task_oauth = self.hass.async_create_task(
if self._cc_task_oauth is None:
self._cc_task_oauth = self.hass.async_create_task(
self.__check_oauth_async())
if self._task_oauth.done():
if (error := self._task_oauth.exception()):
if self._cc_task_oauth.done():
if (error := self._cc_task_oauth.exception()):
_LOGGER.error('task_oauth exception, %s', error)
self._config_error_reason = str(error)
self._cc_config_rc = str(error)
return self.async_show_progress_done(next_step_id='oauth_error')
if self._miot_oauth:
await self._miot_oauth.deinit_async()
@ -335,17 +407,17 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
progress_action='oauth',
description_placeholders={
'link_left':
f'<a href="{self._oauth_auth_url}" target="_blank">',
f'<a href="{self._cc_oauth_auth_url}" target="_blank">',
'link_right': '</a>'
},
progress_task=self._task_oauth,
progress_task=self._cc_task_oauth,
)
async def __check_oauth_async(self) -> None:
# TASK 1: Get oauth code
if not self._fut_oauth_code:
if not self._cc_fut_oauth_code:
raise MIoTConfigError('oauth_code_fut_error')
oauth_code: Optional[str] = await self._fut_oauth_code
oauth_code: Optional[str] = await self._cc_fut_oauth_code
if not oauth_code:
raise MIoTConfigError('oauth_code_error')
# TASK 2: Get access_token and user_info from miot_oauth
@ -387,10 +459,10 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
try:
if not self._miot_http:
raise MIoTConfigError('http_client_error')
self._home_info_buffer = (
self._cc_home_info = (
await self._miot_http.get_devices_async())
_LOGGER.info('get_homeinfos response: %s', self._home_info_buffer)
self._uid = self._home_info_buffer['uid']
_LOGGER.info('get_homeinfos response: %s', self._cc_home_info)
self._uid = self._cc_home_info['uid']
if self._uid == self._nick_name:
self._nick_name = DEFAULT_NICK_NAME
# Save auth_info
@ -424,14 +496,14 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
home_list = {}
tip_devices = self._miot_i18n.translate(key='config.other.devices')
# home list
for home_id, home_info in self._home_info_buffer[
for home_id, home_info in self._cc_home_info[
'homes']['home_list'].items():
# i18n
tip_central = ''
group_id = home_info.get('group_id', None)
dev_list = {
device['did']: device
for device in list(self._home_info_buffer['devices'].values())
for device in list(self._cc_home_info['devices'].values())
if device.get('home_id', None) == home_id}
if (
mips_list
@ -446,14 +518,14 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
f'{home_info["home_name"]} '
f'[ {len(dev_list)} {tip_devices} {tip_central} ]')
self._home_list_show = dict(sorted(home_list.items()))
self._cc_home_list_show = dict(sorted(home_list.items()))
# TASK 7: Get user's MiHome certificate
if self._cloud_server in SUPPORT_CENTRAL_GATEWAY_CTRL:
miot_cert = MIoTCert(
storage=self._miot_storage,
uid=self._uid, cloud_server=self._cloud_server)
if not self._user_cert_state:
if not self._cc_user_cert_done:
try:
if await miot_cert.user_cert_remaining_time_async(
did=self._virtual_did) < MIHOME_CERT_EXPIRE_MARGIN:
@ -472,7 +544,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
if not await miot_cert.update_user_cert_async(
cert=crt_str):
raise MIoTError('update_user_cert_async failed')
self._user_cert_state = True
self._cc_user_cert_done = True
_LOGGER.info(
'get mihome cert success, %s, %s',
self._uid, self._virtual_did)
@ -493,13 +565,13 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
# Show setup error message
async def async_step_oauth_error(self, user_input=None):
if self._config_error_reason is None:
if self._cc_config_rc is None:
return await self.async_step_oauth()
if self._config_error_reason.startswith('Flow aborted: '):
if self._cc_config_rc.startswith('Flow aborted: '):
raise AbortFlow(
reason=self._config_error_reason.replace('Flow aborted: ', ''))
error_reason = self._config_error_reason
self._config_error_reason = None
reason=self._cc_config_rc.replace('Flow aborted: ', ''))
error_reason = self._cc_config_rc
self._cc_config_rc = None
return self.async_show_form(
step_id='oauth_error',
data_schema=vol.Schema({}),
@ -519,7 +591,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
if not home_selected:
return await self.__display_homes_select_form(
'no_family_selected')
for home_id, home_info in self._home_info_buffer[
for home_id, home_info in self._cc_home_info[
'homes']['home_list'].items():
if home_id in home_selected:
self._home_selected[home_id] = home_info
@ -528,7 +600,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
# Storage device list
devices_list: dict[str, dict] = {
did: dev_info
for did, dev_info in self._home_info_buffer['devices'].items()
for did, dev_info in self._cc_home_info['devices'].items()
if dev_info['home_id'] in home_selected}
if not devices_list:
return await self.__display_homes_select_form('no_devices')
@ -563,7 +635,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
step_id='homes_select',
data_schema=vol.Schema({
vol.Required('home_infos'): cv.multi_select(
self._home_list_show),
self._cc_home_list_show),
vol.Required(
'area_name_rule',
default=self._area_name_rule # type: ignore
@ -838,17 +910,10 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
_oauth_redirect_url_full: str
_auth_info: dict
_home_selected: dict
_home_info_buffer: dict
_home_list_show: dict
_device_list_sorted: dict
_devices_local: dict
_devices_add: list[str]
_devices_remove: list[str]
_oauth_auth_url: Optional[str]
_task_oauth: Optional[asyncio.Task[None]]
_config_error_reason: Optional[str]
_fut_oauth_code: Optional[asyncio.Future]
# Config options
_lang_new: str
_nick_name_new: Optional[str]
@ -857,12 +922,24 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
_update_user_info: bool
_update_devices: bool
_update_trans_rules: bool
_update_lan_ctrl_config: bool
_opt_lan_ctrl_cfg: bool
_opt_network_detect_cfg: bool
_trans_rules_count: int
_trans_rules_count_success: int
_need_reload: bool
# Config cache
_cc_home_info: dict
_cc_home_list_show: dict
_cc_oauth_auth_url: Optional[str]
_cc_task_oauth: Optional[asyncio.Task[None]]
_cc_config_rc: Optional[str]
_cc_fut_oauth_code: Optional[asyncio.Future]
_cc_devices_local: dict
_cc_network_detect_addr: str
def __init__(self, config_entry: config_entries.ConfigEntry):
self._config_entry = config_entry
self._main_loop = asyncio.get_event_loop()
@ -888,18 +965,11 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._oauth_redirect_url_full = ''
self._auth_info = {}
self._home_selected = {}
self._home_info_buffer = {}
self._home_list_show = {}
self._device_list_sorted = {}
self._devices_local = {}
self._devices_add = []
self._devices_remove = []
self._oauth_auth_url = None
self._task_oauth = None
self._config_error_reason = None
self._fut_oauth_code = None
self._lang_new = self._integration_language
self._nick_name_new = None
self._action_debug_new = False
@ -907,12 +977,22 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._update_user_info = False
self._update_devices = False
self._update_trans_rules = False
self._update_lan_ctrl_config = False
self._opt_lan_ctrl_cfg = False
self._opt_network_detect_cfg = False
self._trans_rules_count = 0
self._trans_rules_count_success = 0
self._need_reload = False
self._cc_home_info = {}
self._cc_home_list_show = {}
self._cc_oauth_auth_url = None
self._cc_task_oauth = None
self._cc_config_rc = None
self._cc_fut_oauth_code = None
self._cc_devices_local = {}
self._cc_network_detect_addr = ''
_LOGGER.info(
'options init, %s, %s, %s, %s', config_entry.entry_id,
config_entry.unique_id, config_entry.data, config_entry.options)
@ -955,8 +1035,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
# Check token
if not await self._miot_client.refresh_oauth_info_async():
# Check network
if not await self._miot_network.get_network_status_async(
timeout=3):
if not await self._miot_network.get_network_status_async():
raise AbortFlow(
reason='network_connect_error',
description_placeholders={})
@ -1002,16 +1081,16 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
async def async_step_oauth(self, user_input=None):
try:
if self._task_oauth is None:
if self._cc_task_oauth is None:
state = str(secrets.randbits(64))
self.hass.data[DOMAIN][self._virtual_did]['oauth_state'] = state
self._miot_oauth.set_redirect_url(
redirect_url=self._oauth_redirect_url_full)
self._oauth_auth_url = self._miot_oauth.gen_auth_url(
self._cc_oauth_auth_url = self._miot_oauth.gen_auth_url(
redirect_url=self._oauth_redirect_url_full, state=state)
_LOGGER.info(
'async_step_oauth, oauth_url: %s',
self._oauth_auth_url)
self._cc_oauth_auth_url)
webhook_async_unregister(
self.hass, webhook_id=self._virtual_did)
webhook_async_register(
@ -1022,23 +1101,23 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
handler=_handle_oauth_webhook,
allowed_methods=(METH_GET,),
)
self._fut_oauth_code = self.hass.data[DOMAIN][
self._cc_fut_oauth_code = self.hass.data[DOMAIN][
self._virtual_did].get('fut_oauth_code', None)
if self._fut_oauth_code is None:
self._fut_oauth_code = self._main_loop.create_future()
if self._cc_fut_oauth_code is None:
self._cc_fut_oauth_code = self._main_loop.create_future()
self.hass.data[DOMAIN][self._virtual_did][
'fut_oauth_code'] = self._fut_oauth_code
self._task_oauth = self.hass.async_create_task(
'fut_oauth_code'] = self._cc_fut_oauth_code
self._cc_task_oauth = self.hass.async_create_task(
self.__check_oauth_async())
_LOGGER.info(
'async_step_oauth, webhook.async_register: %s',
self._virtual_did)
if self._task_oauth.done():
if (error := self._task_oauth.exception()):
if self._cc_task_oauth.done():
if (error := self._cc_task_oauth.exception()):
_LOGGER.error('task_oauth exception, %s', error)
self._config_error_reason = str(error)
self._task_oauth = None
self._cc_config_rc = str(error)
self._cc_task_oauth = None
return self.async_show_progress_done(
next_step_id='oauth_error')
return self.async_show_progress_done(
@ -1047,7 +1126,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
_LOGGER.error(
'async_step_oauth error, %s, %s',
err, traceback.format_exc())
self._config_error_reason = str(err)
self._cc_config_rc = str(err)
return self.async_show_progress_done(next_step_id='oauth_error')
return self.async_show_progress(
@ -1055,17 +1134,17 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
progress_action='oauth',
description_placeholders={
'link_left':
f'<a href="{self._oauth_auth_url}" target="_blank">',
f'<a href="{self._cc_oauth_auth_url}" target="_blank">',
'link_right': '</a>'
},
progress_task=self._task_oauth,
progress_task=self._cc_task_oauth,
)
async def __check_oauth_async(self) -> None:
# Get oauth code
if not self._fut_oauth_code:
if not self._cc_fut_oauth_code:
raise MIoTConfigError('oauth_code_fut_error')
oauth_code: str = await self._fut_oauth_code
oauth_code: str = await self._cc_fut_oauth_code
if not oauth_code:
raise MIoTConfigError('oauth_code_error')
_LOGGER.debug('options flow __check_oauth_async, %s', oauth_code)
@ -1105,13 +1184,13 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
# Show setup error message
async def async_step_oauth_error(self, user_input=None):
if self._config_error_reason is None:
if self._cc_config_rc is None:
return await self.async_step_oauth()
if self._config_error_reason.startswith('Flow aborted: '):
if self._cc_config_rc.startswith('Flow aborted: '):
raise AbortFlow(
reason=self._config_error_reason.replace('Flow aborted: ', ''))
error_reason = self._config_error_reason
self._config_error_reason = None
reason=self._cc_config_rc.replace('Flow aborted: ', ''))
error_reason = self._cc_config_rc
self._cc_config_rc = None
return self.async_show_form(
step_id='oauth_error',
data_schema=vol.Schema({}),
@ -1155,8 +1234,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
): bool,
vol.Required(
'update_lan_ctrl_config',
default=self._update_lan_ctrl_config # type: ignore
): bool
default=self._opt_lan_ctrl_cfg # type: ignore
): bool,
vol.Required(
'network_detect_config',
default=self._opt_network_detect_cfg # type: ignore
): bool,
}),
errors={},
description_placeholders={
@ -1167,7 +1250,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
last_step=False,
)
# Check network
if not await self._miot_network.get_network_status_async(timeout=3):
if not await self._miot_network.get_network_status_async():
raise AbortFlow(
reason='network_connect_error', description_placeholders={})
self._lang_new = user_input.get(
@ -1184,8 +1267,10 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
'display_devices_changed_notify', self._display_devs_notify)
self._update_trans_rules = user_input.get(
'update_trans_rules', self._update_trans_rules)
self._update_lan_ctrl_config = user_input.get(
'update_lan_ctrl_config', self._update_lan_ctrl_config)
self._opt_lan_ctrl_cfg = user_input.get(
'update_lan_ctrl_config', self._opt_lan_ctrl_cfg)
self._opt_network_detect_cfg = user_input.get(
'network_detect_config', self._opt_network_detect_cfg)
return await self.async_step_update_user_info()
@ -1227,7 +1312,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
# Get home info
try:
self._home_info_buffer = (
self._cc_home_info = (
await self._miot_http.get_devices_async())
except Exception as err:
_LOGGER.error(
@ -1237,14 +1322,14 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
home_list = {}
tip_devices = self._miot_i18n.translate(key='config.other.devices')
# home list
for home_id, home_info in self._home_info_buffer[
for home_id, home_info in self._cc_home_info[
'homes']['home_list'].items():
# i18n
tip_central = ''
group_id = home_info.get('group_id', None)
did_list = {
device['did']: device for device in list(
self._home_info_buffer['devices'].values())
self._cc_home_info['devices'].values())
if device.get('home_id', None) == home_id}
if (
group_id in mips_list
@ -1262,12 +1347,13 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._home_selected_list = [
home_id for home_id in self._home_selected_list
if home_id in home_list]
self._home_list_show = dict(sorted(home_list.items()))
self._cc_home_list_show = dict(sorted(home_list.items()))
# Get local devices
self._devices_local: dict = await self._miot_storage.load_async(
domain='miot_devices',
name=f'{self._uid}_{self._cloud_server}',
type_=dict) or {} # type: ignore
self._cc_devices_local: dict = (
await self._miot_storage.load_async(
domain='miot_devices',
name=f'{self._uid}_{self._cloud_server}',
type_=dict)) or {} # type: ignore
return await self.__display_homes_select_form('')
@ -1276,14 +1362,14 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
return await self.__display_homes_select_form('no_family_selected')
self._ctrl_mode = user_input.get('ctrl_mode', self._ctrl_mode)
self._home_selected = {}
for home_id, home_info in self._home_info_buffer[
for home_id, home_info in self._cc_home_info[
'homes']['home_list'].items():
if home_id in self._home_selected_list:
self._home_selected[home_id] = home_info
# Get device list
device_list: dict = {
did: dev_info
for did, dev_info in self._home_info_buffer['devices'].items()
for did, dev_info in self._cc_home_info['devices'].items()
if dev_info['home_id'] in self._home_selected_list}
if not device_list:
return await self.__display_homes_select_form('no_devices')
@ -1296,14 +1382,14 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
return await self.update_devices_done_async()
async def __display_homes_select_form(self, reason: str):
devices_local_count: str = str(len(self._devices_local))
devices_local_count: str = str(len(self._cc_devices_local))
return self.async_show_form(
step_id='homes_select',
data_schema=vol.Schema({
vol.Required(
'home_infos',
default=self._home_selected_list # type: ignore
): cv.multi_select(self._home_list_show),
): cv.multi_select(self._cc_home_list_show),
vol.Required(
'devices_filter', default=False # type: ignore
): bool,
@ -1488,9 +1574,9 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._devices_add = [
did for did in list(self._device_list_sorted.keys())
if did not in self._devices_local]
if did not in self._cc_devices_local]
self._devices_remove = [
did for did in self._devices_local.keys()
did for did in self._cc_devices_local.keys()
if did not in self._device_list_sorted]
_LOGGER.debug(
'devices update, add->%s, remove->%s',
@ -1534,8 +1620,8 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
return await self.async_step_update_lan_ctrl_config()
async def async_step_update_lan_ctrl_config(self, user_input=None):
if not self._update_lan_ctrl_config:
return await self.async_step_config_confirm()
if not self._opt_lan_ctrl_cfg:
return await self.async_step_network_detect_config()
if not user_input:
notice_net_dup: str = ''
lan_ctrl_config = await self._miot_storage.load_user_config_async(
@ -1594,8 +1680,93 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
await self._miot_lan.update_subscribe_option(
enable_subscribe=enable_subscribe_new)
return await self.async_step_network_detect_config()
async def async_step_network_detect_config(
self, user_input: Optional[dict] = None
):
if not self._opt_network_detect_cfg:
return await self.async_step_config_confirm()
if not user_input:
return await self.__show_network_detect_config_form(reason='')
self._cc_network_detect_addr = user_input.get(
'network_detect_addr', self._cc_network_detect_addr)
ip_list: list[str] = []
url_list: list[str] = []
if self._cc_network_detect_addr:
invalid_list: list[str] = []
for addr in self._cc_network_detect_addr.split(','):
addr = addr.strip()
if not addr:
continue
# pylint: disable=broad-exception-caught
try:
ipaddress.ip_address(addr)
ip_list.append(addr)
continue
except Exception:
pass
try:
result = urlparse(addr)
if (
result.netloc
and result.scheme.startswith('http')
):
url_list.append(addr)
continue
except Exception:
pass
invalid_list.append(addr)
if invalid_list:
return await self.__show_network_detect_config_form(
reason='invalid_network_addr')
network_detect_addr: dict = {}
if ip_list or url_list:
if ip_list and not await self._miot_network.ping_multi_async(
ip_list=ip_list):
return await self.__show_network_detect_config_form(
reason='invalid_ip_addr')
if url_list and not await self._miot_network.http_multi_async(
url_list=url_list):
return await self.__show_network_detect_config_form(
reason='invalid_http_addr')
network_detect_addr = {
'ip': ip_list, 'url': url_list}
else:
if not await self._miot_network.get_network_status_async():
return await self.__show_network_detect_config_form(
reason='invalid_default_addr')
network_detect_addr = {'ip': [], 'url': []}
if await self._miot_storage.update_user_config_async(
uid='global_config', cloud_server='all', config={
'network_detect_addr': network_detect_addr}):
_LOGGER.info(
'update network_detect_addr, %s', network_detect_addr)
await self._miot_network.update_addr_list_async(
ip_addr_list=ip_list, url_addr_list=url_list)
return await self.async_step_config_confirm()
async def __show_network_detect_config_form(self, reason: str):
if not self._cc_network_detect_addr:
addr_list: dict = (await self._miot_storage.load_user_config_async(
'global_config', 'all', ['network_detect_addr'])).get(
'network_detect_addr', {})
self._cc_network_detect_addr = ','.join(
addr_list.get('ip', [])+addr_list.get('url', []))
return self.async_show_form(
step_id='network_detect_config',
data_schema=vol.Schema({
vol.Optional(
'network_detect_addr',
default=self._cc_network_detect_addr # type: ignore
): str,
}),
errors={'base': reason},
last_step=False
)
async def async_step_config_confirm(self, user_input=None):
if not user_input or not user_input.get('confirm', False):
enable_text = self._miot_i18n.translate(

View File

@ -1870,7 +1870,7 @@ async def get_miot_instance_async(
if not network:
network = MIoTNetwork(
ip_addr_list=network_detect_addr.get('ip', []),
http_addr_list=network_detect_addr.get('http', []),
url_addr_list=network_detect_addr.get('url', []),
refresh_interval=NETWORK_REFRESH_INTERVAL,
loop=loop)
hass.data[DOMAIN]['miot_network'] = network

View File

@ -83,7 +83,7 @@ class MIoTNetwork:
'8.8.8.8', # Google Public DNS
'9.9.9.9' # Quad9
]
_HTTP_ADDRESS_LIST: list[str] = [
_URL_ADDRESS_LIST: list[str] = [
'https://www.bing.com',
'https://www.google.com',
'https://www.baidu.com'
@ -94,7 +94,7 @@ class MIoTNetwork:
_main_loop: asyncio.AbstractEventLoop
_ip_addr_map: dict[str, float]
_http_addr_list: dict[str, float]
_url_addr_list: dict[str, float]
_http_session: aiohttp.ClientSession
_refresh_interval: int
@ -113,7 +113,7 @@ class MIoTNetwork:
def __init__(
self,
ip_addr_list: Optional[list[str]] = None,
http_addr_list: Optional[list[str]] = None,
url_addr_list: Optional[list[str]] = None,
refresh_interval: Optional[int] = None,
loop: Optional[asyncio.AbstractEventLoop] = None
) -> None:
@ -122,8 +122,8 @@ class MIoTNetwork:
ip: self._DETECT_TIMEOUT for ip in
ip_addr_list or self._IP_ADDRESS_LIST}
self._http_addr_map = {
http: self._DETECT_TIMEOUT for http in
http_addr_list or self._HTTP_ADDRESS_LIST}
url: self._DETECT_TIMEOUT for url in
url_addr_list or self._URL_ADDRESS_LIST}
self._http_session = aiohttp.ClientSession()
self._refresh_interval = refresh_interval or self._REFRESH_INTERVAL
@ -171,14 +171,22 @@ class MIoTNetwork:
async def update_addr_list_async(
self,
ip_addr_list: Optional[list[str]] = None,
http_addr_list: Optional[list[str]] = None,
url_addr_list: Optional[list[str]] = None,
) -> None:
if ip_addr_list:
self._ip_addr_map = {
ip: self._DETECT_TIMEOUT for ip in ip_addr_list}
if http_addr_list:
self._http_addr_map = {
http: self._DETECT_TIMEOUT for http in http_addr_list}
new_ip_map: dict = {}
for ip in ip_addr_list or self._IP_ADDRESS_LIST:
if ip in self._ip_addr_map:
new_ip_map[ip] = self._ip_addr_map[ip]
else:
new_ip_map[ip] = self._DETECT_TIMEOUT
self._ip_addr_map = new_ip_map
new_url_map: dict = {}
for url in url_addr_list or self._URL_ADDRESS_LIST:
if url in self._http_addr_map:
new_url_map[url] = self._http_addr_map[url]
else:
new_url_map[url] = self._DETECT_TIMEOUT
self._http_addr_map = new_url_map
def sub_network_status(
self, key: str, handler: Callable[[bool], Coroutine]
@ -210,18 +218,18 @@ class MIoTNetwork:
ip_ts = ts
if (
ip_ts < self._DETECT_TIMEOUT
and self.ping_multi_async(ip_list=[ip_addr])
and await self.ping_multi_async(ip_list=[ip_addr])
):
return True
http_addr: str = ''
http_ts: float = self._DETECT_TIMEOUT
url_addr: str = ''
url_ts: float = self._DETECT_TIMEOUT
for http, ts in self._http_addr_map.items():
if ts < http_ts:
http_addr = http
http_ts = ts
if ts < url_ts:
url_addr = http
url_ts = ts
if (
http_ts < self._DETECT_TIMEOUT
and await self.http_multi_async(url_list=[http_addr])
url_ts < self._DETECT_TIMEOUT
and await self.http_multi_async(url_list=[url_addr])
):
return True
# Detect all addresses
@ -293,9 +301,8 @@ class MIoTNetwork:
start_ts: float = self._main_loop.time()
try:
async with self._http_session.get(
url, timeout=self._DETECT_TIMEOUT) as response:
if response.status == 200:
return self._main_loop.time() - start_ts
url, timeout=self._DETECT_TIMEOUT):
return self._main_loop.time() - start_ts
except Exception: # pylint: disable=broad-exception-caught
pass
return self._DETECT_TIMEOUT

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Grundkonfiguration",
"description": "### Anmeldegebiet\r\nWählen Sie das Gebiet, in dem sich Ihr Xiaomi Home-Konto befindet. Sie können es in der Xiaomi Home App unter `Mein (unten im Menü) > Weitere Einstellungen > Über Xiaomi Home` überprüfen.\r\n### Sprache\r\nWählen Sie die Sprache, in der Geräte und Entitätsnamen angezeigt werden. Teile von Sätzen, die nicht übersetzt sind, werden in Englisch angezeigt.\r\n### OAuth2-Authentifizierungs-Umleitungs-URL\r\nDie Umleitungs-URL für die OAuth2-Authentifizierung lautet **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant muss im selben lokalen Netzwerk wie das aktuelle Betriebsterminal (z. B. ein persönlicher Computer) und das Betriebsterminal muss über diese Adresse auf die Home Assistant-Homepage zugreifen können. Andernfalls kann die Anmeldeauthentifizierung fehlschlagen.\r\n### Hinweis\r\n- Für Benutzer mit Hunderten oder mehr Mi Home-Geräten wird das erste Hinzufügen der Integration einige Zeit in Anspruch nehmen. Bitte haben Sie Geduld.\r\n- Wenn Home Assistant in einer Docker-Umgebung läuft, stellen Sie bitte sicher, dass der Docker-Netzwerkmodus auf host eingestellt ist, da sonst die lokale Steuerungsfunktion möglicherweise nicht richtig funktioniert.\r\n- Die lokale Steuerungsfunktion der Integration hat einige Abhängigkeiten. Bitte lesen Sie das README sorgfältig.",
"description": "### Anmeldegebiet\r\nWählen Sie das Gebiet, in dem sich Ihr Xiaomi Home-Konto befindet. Sie können es in der Xiaomi Home App unter `Mein (unten im Menü) > Weitere Einstellungen > Über Xiaomi Home` überprüfen.\r\n### Sprache\r\nWählen Sie die Sprache, in der Geräte und Entitätsnamen angezeigt werden. Teile von Sätzen, die nicht übersetzt sind, werden in Englisch angezeigt.\r\n### OAuth2-Authentifizierungs-Umleitungs-URL\r\nDie Umleitungs-URL für die OAuth2-Authentifizierung lautet **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant muss im selben lokalen Netzwerk wie das aktuelle Betriebsterminal (z. B. ein persönlicher Computer) und das Betriebsterminal muss über diese Adresse auf die Home Assistant-Homepage zugreifen können. Andernfalls kann die Anmeldeauthentifizierung fehlschlagen.\r\n### Netzwerkerkennungsadresse\r\nWird verwendet, um zu überprüfen, ob das Netzwerk normal funktioniert. Wenn nicht festgelegt, wird die Standardadresse des Systems verwendet. Wenn die Standardadressprüfung fehlschlägt, können Sie versuchen, eine benutzerdefinierte Adresse einzugeben.\r\n- Sie können mehrere Erkennungsadressen eingeben, getrennt durch ein Komma, z. B. `8.8.8.8,https://www.bing.com`\r\n- Wenn es sich um eine IP-Adresse handelt, wird die Erkennung durch Ping durchgeführt. Wenn es sich um eine HTTP(s)-Adresse handelt, wird die Erkennung durch einen HTTP GET-Aufruf durchgeführt.\r\n- **Diese Konfiguration ist global und Änderungen wirken sich auf andere Integrationsinstanzen aus. Bitte ändern Sie sie mit Vorsicht.**\r\n### Hinweis\r\n- Für Benutzer mit Hunderten oder mehr Mi Home-Geräten wird das erste Hinzufügen der Integration einige Zeit in Anspruch nehmen. Bitte haben Sie Geduld.\r\n- Wenn Home Assistant in einer Docker-Umgebung läuft, stellen Sie bitte sicher, dass der Docker-Netzwerkmodus auf host eingestellt ist, da sonst die lokale Steuerungsfunktion möglicherweise nicht richtig funktioniert.\r\n- Die lokale Steuerungsfunktion der Integration hat einige Abhängigkeiten. Bitte lesen Sie das README sorgfältig.",
"data": {
"cloud_server": "Anmeldegebiet",
"integration_language": "Sprache",
"oauth_redirect_url": "OAuth2-Authentifizierungs-Umleitungs-URL"
"oauth_redirect_url": "OAuth2-Authentifizierungs-Umleitungs-URL",
"network_detect_addr": "Netzwerkerkennungsadresse"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "Keine Familie ausgewählt.",
"no_devices": "Im ausgewählten Haushalt sind keine Geräte vorhanden. Bitte wählen Sie einen Haushalt mit Geräten aus und fahren Sie fort.",
"no_filter_devices": "Gefilterte Geräte sind leer. Bitte wählen Sie gültige Filterkriterien aus und fahren Sie fort.",
"no_central_device": "Im Modus \"Xiaomi Central Hub Gateway\" muss ein verfügbares Xiaomi Central Hub Gateway im lokalen Netzwerk von Home Assistant vorhanden sein. Stellen Sie sicher, dass die ausgewählte Familie diese Anforderungen erfüllt."
"no_central_device": "Im Modus \"Xiaomi Central Hub Gateway\" muss ein verfügbares Xiaomi Central Hub Gateway im lokalen Netzwerk von Home Assistant vorhanden sein. Stellen Sie sicher, dass die ausgewählte Familie diese Anforderungen erfüllt.",
"invalid_network_addr": "Ungültige IP-Adresse oder HTTP-Adresse vorhanden, bitte geben Sie eine gültige Adresse ein.",
"invalid_ip_addr": "Unzugängliche IP-Adresse vorhanden, bitte geben Sie eine gültige IP-Adresse ein.",
"invalid_http_addr": "Unzugängliche HTTP-Adresse vorhanden, bitte geben Sie eine gültige HTTP-Adresse ein.",
"invalid_default_addr": "Die Standard-Netzwerkerkennungsadresse ist nicht erreichbar, bitte überprüfen Sie die Netzwerkkonfiguration oder verwenden Sie eine benutzerdefinierte Netzwerkerkennungsadresse."
},
"abort": {
"network_connect_error": "Konfiguration fehlgeschlagen. Netzwerkverbindung fehlgeschlagen. Überprüfen Sie die Netzwerkkonfiguration des Geräts.",
@ -152,6 +157,13 @@
"enable_subscribe": "LAN-Abonnement aktivieren"
}
},
"network_detect_config": {
"title": "Netzwerkerkennungs-Konfiguration",
"description": "## Gebrauchsanweisung\r\n### Netzwerk-Erkennungsadresse\r\nWird verwendet, um zu überprüfen, ob das Netzwerk normal funktioniert. Wenn nicht festgelegt, wird die Standardadresse des Systems verwendet. Wenn die Standardadressprüfung fehlschlägt, können Sie versuchen, eine benutzerdefinierte Adresse einzugeben.\r\n- Sie können mehrere Erkennungsadressen eingeben, getrennt durch ein Komma, z. B. `8.8.8.8,https://www.bing.com`\r\n- Wenn es sich um eine IP-Adresse handelt, wird die Erkennung durch Ping durchgeführt. Wenn es sich um eine HTTP(s)-Adresse handelt, wird die Erkennung durch einen HTTP GET-Aufruf durchgeführt.\r\n- **Diese Konfiguration ist global und Änderungen wirken sich auf andere Integrationsinstanzen aus. Bitte ändern Sie sie mit Vorsicht.**",
"data": {
"network_detect_addr": "Netzwerkerkennungsadresse"
}
},
"config_confirm": {
"title": "Bestätigen Sie die Konfiguration",
"description": "**{nick_name}**, bitte bestätigen Sie die neuesten Konfigurationsinformationen und klicken Sie dann auf \"Senden\". Die Integration wird mit den aktualisierten Konfigurationen erneut geladen.\r\n\r\nIntegrationsprache:\t{lang_new}\r\nBenutzername:\t{nick_name_new}\r\nAction-Debug-Modus:\t{action_debug}\r\nVerstecke Nicht-Standard-Entitäten:\t{hide_non_standard_entities}\r\nGerätestatusänderungen anzeigen:\t{display_devices_changed_notify}\r\nGeräteänderungen:\t{devices_add} neue Geräte hinzufügen, {devices_remove} Geräte entfernen\r\nKonvertierungsregeländerungen:\tInsgesamt {trans_rules_count} Regeln, aktualisiert {trans_rules_count_success} Regeln",
@ -174,7 +186,11 @@
"no_central_device": "Der Modus \"Zentral Gateway\" erfordert ein verfügbares Xiaomi-Zentral-Gateway im lokalen Netzwerk, in dem Home Assistant installiert ist. Überprüfen Sie, ob die ausgewählte Familie diese Anforderung erfüllt.",
"mdns_discovery_error": "Lokaler Geräteerkennungsdienstfehler.",
"update_config_error": "Fehler beim Aktualisieren der Konfigurationsinformationen.",
"not_confirm": "Änderungen wurden nicht bestätigt. Bitte bestätigen Sie die Auswahl, bevor Sie sie einreichen."
"not_confirm": "Änderungen wurden nicht bestätigt. Bitte bestätigen Sie die Auswahl, bevor Sie sie einreichen.",
"invalid_network_addr": "Ungültige IP-Adresse oder HTTP-Adresse vorhanden, bitte geben Sie eine gültige Adresse ein.",
"invalid_ip_addr": "Unzugängliche IP-Adresse vorhanden, bitte geben Sie eine gültige IP-Adresse ein.",
"invalid_http_addr": "Unzugängliche HTTP-Adresse vorhanden, bitte geben Sie eine gültige HTTP-Adresse ein.",
"invalid_default_addr": "Die Standard-Netzwerkerkennungsadresse ist nicht erreichbar, bitte überprüfen Sie die Netzwerkkonfiguration oder verwenden Sie eine benutzerdefinierte Netzwerkerkennungsadresse."
},
"abort": {
"network_connect_error": "Konfiguration fehlgeschlagen. Netzwerkverbindungsfehler. Überprüfen Sie die Netzwerkkonfiguration des Geräts.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Basic configuration",
"description": "### Login Region\r\nSelect the region of your Xiaomi account. You can find it in the Xiaomi Home APP > Profile (located in the menu at the bottom) > Additional settings > About Xiaomi Home.\r\n### Language\r\nSelect the language of the device and entity names. Some sentences without translation will be displayed in English.\r\n### OAuth2 Redirect URL\r\nThe OAuth2 authentication redirect address is **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. The Home Assistant needs to be in the same local area network as the current operating terminal (e.g., the personal computer) and the operating terminal can access the Home Assistant home page through this address. Otherwise, the login authentication may fail.\r\n### Note\r\n- For users with hundreds or more Mi Home devices, the initial addition of the integration will take some time. Please be patient.\r\n- If Home Assistant is running in a Docker environment, please ensure that the Docker network mode is set to host, otherwise local control functionality may not work properly.\r\n- The local control functionality of the integration has some dependencies. Please read the README carefully.",
"description": "### Login Region\r\nSelect the region of your Xiaomi account. You can find it in the Xiaomi Home APP > Profile (located in the menu at the bottom) > Additional settings > About Xiaomi Home.\r\n### Language\r\nSelect the language of the device and entity names. Some sentences without translation will be displayed in English.\r\n### OAuth2 Redirect URL\r\nThe OAuth2 authentication redirect address is **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. The Home Assistant needs to be in the same local area network as the current operating terminal (e.g., the personal computer) and the operating terminal can access the Home Assistant home page through this address. Otherwise, the login authentication may fail.\r\n### Network Detection Address\r\nUsed to check if the network is functioning properly. If not set, the system default address will be used. If the default address check fails, you can try entering a custom address.\r\n- You can enter multiple detection addresses, separated by commas, such as `8.8.8.8,https://www.bing.com`\r\n- If it is an IP address, detection will be done via ping. If it is an HTTP(s) address, detection will be done via HTTP GET request.\r\n- **This configuration is global, and changes will affect other integration instances. Please modify with caution.**\r\n### Note\r\n- For users with hundreds or more Mi Home devices, the initial addition of the integration will take some time. Please be patient.\r\n- If Home Assistant is running in a Docker environment, please ensure that the Docker network mode is set to host, otherwise local control functionality may not work properly.\r\n- The local control functionality of the integration has some dependencies. Please read the README carefully.",
"data": {
"cloud_server": "Login Region",
"integration_language": "Language",
"oauth_redirect_url": "OAuth2 Redirect URL"
"oauth_redirect_url": "OAuth2 Redirect URL",
"network_detect_addr": "Network Detection Address"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "No home selected.",
"no_devices": "There are no devices in the selected home. Please select a home with devices and continue.",
"no_filter_devices": "Filtered devices are empty. Please select valid filter criteria and continue.",
"no_central_device": "[Central Hub Gateway Mode] requires a Xiaomi central hub gateway available in the local network where Home Assistant exists. Please check if the selected home meets the requirement."
"no_central_device": "[Central Hub Gateway Mode] requires a Xiaomi central hub gateway available in the local network where Home Assistant exists. Please check if the selected home meets the requirement.",
"invalid_network_addr": "Invalid IP address or HTTP address detected, please enter a valid address.",
"invalid_ip_addr": "Unreachable IP address detected, please enter a valid IP address.",
"invalid_http_addr": "Unreachable HTTP address detected, please enter a valid HTTP address.",
"invalid_default_addr": "Default network detection address is unreachable, please check network configuration or use a custom network detection address."
},
"abort": {
"network_connect_error": "Configuration failed. The network connection is abnormal. Please check the equipment network configuration.",
@ -152,6 +157,13 @@
"enable_subscribe": "Enable LAN subscription"
}
},
"network_detect_config": {
"title": "Network Detection Configuration",
"description": "## Usage Introduction\r\n### Network Detection Address\r\nUsed to check if the network is functioning properly. If not set, the system default address will be used. If the default address check fails, you can try entering a custom address.\r\n- You can enter multiple detection addresses, separated by commas, such as `8.8.8.8,https://www.bing.com`\r\n- If it is an IP address, detection will be done via ping. If it is an HTTP(s) address, detection will be done via HTTP GET request.\r\n- **This configuration is global, and changes will affect other integration instances. Please modify with caution.**",
"data": {
"network_detect_addr": "Network Detection Address"
}
},
"config_confirm": {
"title": "Confirm Configuration",
"description": "Hello **{nick_name}**, please confirm the latest configuration information and then Click SUBMIT.\r\nThe integration will reload using the updated configuration.\r\n\r\nIntegration Language: \t{lang_new}\r\nNickname: \t{nick_name_new}\r\nDebug mode for action: \t{action_debug}\r\nHide non-standard created entities: \t{hide_non_standard_entities}\r\nDisplay device status change notifications:\t{display_devices_changed_notify}\r\nDevice Changes: \tAdd **{devices_add}** devices, Remove **{devices_remove}** devices\r\nTransformation rules change: \tThere are a total of **{trans_rules_count}** rules, and updated **{trans_rules_count_success}** rules",
@ -174,7 +186,11 @@
"no_central_device": "[Central Hub Gateway Mode] requires a Xiaomi central hub gateway available in the local network where Home Assistant exists. Please check if the selected home meets the requirement.",
"mdns_discovery_error": "Local device discovery service exception.",
"update_config_error": "Failed to update configuration information.",
"not_confirm": "Changes are not confirmed. Please confirm the change before submitting."
"not_confirm": "Changes are not confirmed. Please confirm the change before submitting.",
"invalid_network_addr": "Invalid IP address or HTTP address detected, please enter a valid address.",
"invalid_ip_addr": "Unreachable IP address detected, please enter a valid IP address.",
"invalid_http_addr": "Unreachable HTTP address detected, please enter a valid HTTP address.",
"invalid_default_addr": "Default network detection address is unreachable, please check network configuration or use a custom network detection address."
},
"abort": {
"network_connect_error": "Configuration failed. The network connection is abnormal. Please check the equipment network configuration.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Configuración básica",
"description": "### Región de inicio de sesión\r\nSeleccione la región donde se encuentra su cuenta de Xiaomi. Puede consultar esta información en `Xiaomi Home APP > Yo (ubicado en el menú inferior) > Más ajustes > Acerca de Xiaomi Home`.\r\n### Idioma\r\nSeleccione el idioma utilizado para los nombres de los dispositivos y entidades. Las partes de las frases que no están traducidas se mostrarán en inglés.\r\n### Dirección de redireccionamiento de autenticación de OAuth2\r\nLa dirección de redireccionamiento de autenticación de OAuth2 es **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant debe estar en la misma red local que el terminal de operación actual (por ejemplo, una computadora personal) y el terminal de operación debe poder acceder a la página de inicio de Home Assistant a través de esta dirección, de lo contrario, la autenticación de inicio de sesión podría fallar.\r\n### Nota\r\n- Para los usuarios con cientos o más dispositivos Mi Home, la adición inicial de la integración tomará algún tiempo. Por favor, sea paciente.\r\n- Si Home Assistant se está ejecutando en un entorno Docker, asegúrese de que el modo de red de Docker esté configurado en host, de lo contrario, la funcionalidad de control local puede no funcionar correctamente.\r\n- La funcionalidad de control local de la integración tiene algunas dependencias. Por favor, lea el README cuidadosamente.",
"description": "### Región de inicio de sesión\r\nSeleccione la región donde se encuentra su cuenta de Xiaomi. Puede consultar esta información en `Xiaomi Home APP > Yo (ubicado en el menú inferior) > Más ajustes > Acerca de Xiaomi Home`.\r\n### Idioma\r\nSeleccione el idioma utilizado para los nombres de los dispositivos y entidades. Las partes de las frases que no están traducidas se mostrarán en inglés.\r\n### Dirección de redireccionamiento de autenticación de OAuth2\r\nLa dirección de redireccionamiento de autenticación de OAuth2 es **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant debe estar en la misma red local que el terminal de operación actual (por ejemplo, una computadora personal) y el terminal de operación debe poder acceder a la página de inicio de Home Assistant a través de esta dirección, de lo contrario, la autenticación de inicio de sesión podría fallar.\r\n### Dirección de Detección de Red\r\nSe utiliza para verificar si la red funciona correctamente. Si no se establece, se utilizará la dirección predeterminada del sistema. Si la verificación de la dirección predeterminada falla, puede intentar ingresar una dirección personalizada.\r\n- Puede ingresar varias direcciones de detección, separadas por comas, como `8.8.8.8,https://www.bing.com`\r\n- Si es una dirección IP, la detección se realizará mediante ping. Si es una dirección HTTP(s), la detección se realizará mediante una solicitud HTTP GET.\r\n- **Esta configuración es global y los cambios afectarán a otras instancias de integración. Modifique con precaución.**\r\n### Nota\r\n- Para los usuarios con cientos o más dispositivos Mi Home, la adición inicial de la integración tomará algún tiempo. Por favor, sea paciente.\r\n- Si Home Assistant se está ejecutando en un entorno Docker, asegúrese de que el modo de red de Docker esté configurado en host, de lo contrario, la funcionalidad de control local puede no funcionar correctamente.\r\n- La funcionalidad de control local de la integración tiene algunas dependencias. Por favor, lea el README cuidadosamente.",
"data": {
"cloud_server": "Región de inicio de sesión",
"integration_language": "Idioma",
"oauth_redirect_url": "Dirección de redireccionamiento de autenticación de OAuth2"
"oauth_redirect_url": "Dirección de redireccionamiento de autenticación de OAuth2",
"network_detect_addr": "Dirección de Detección de Red"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "No se ha seleccionado ningún hogar.",
"no_devices": "No hay dispositivos en el hogar seleccionado. Por favor, seleccione un hogar con dispositivos y continúe.",
"no_filter_devices": "Los dispositivos filtrados están vacíos. Por favor, seleccione criterios de filtro válidos y continúe.",
"no_central_device": "【Modo de puerta de enlace central】Se requiere una puerta de enlace Xiaomi disponible en la red local donde se encuentra Home Assistant. Verifique si el hogar seleccionado cumple con este requisito."
"no_central_device": "【Modo de puerta de enlace central】Se requiere una puerta de enlace Xiaomi disponible en la red local donde se encuentra Home Assistant. Verifique si el hogar seleccionado cumple con este requisito.",
"invalid_network_addr": "Se detectó una dirección IP o HTTP no válida, por favor ingrese una dirección válida.",
"invalid_ip_addr": "Se detectó una dirección IP inaccesible, por favor ingrese una dirección IP válida.",
"invalid_http_addr": "Se detectó una dirección HTTP inaccesible, por favor ingrese una dirección HTTP válida.",
"invalid_default_addr": "La dirección de detección de red predeterminada no es accesible, por favor verifique la configuración de la red o use una dirección de detección de red personalizada."
},
"abort": {
"network_connect_error": "La configuración ha fallado. Existe un problema con la conexión de red, verifique la configuración de red del dispositivo.",
@ -152,6 +157,13 @@
"enable_subscribe": "Habilitar suscripción LAN"
}
},
"network_detect_config": {
"title": "Configuración de Detección de Red",
"description": "## Introducción al Uso\r\n### Dirección de Detección de Red\r\nSe utiliza para verificar si la red funciona correctamente. Si no se establece, se utilizará la dirección predeterminada del sistema. Si la verificación de la dirección predeterminada falla, puede intentar ingresar una dirección personalizada.\r\n- Puede ingresar varias direcciones de detección, separadas por comas, como `8.8.8.8,https://www.bing.com`\r\n- Si es una dirección IP, la detección se realizará mediante ping. Si es una dirección HTTP(s), la detección se realizará mediante una solicitud HTTP GET.\r\n- **Esta configuración es global y los cambios afectarán a otras instancias de integración. Modifique con precaución.**",
"data": {
"network_detect_addr": "Dirección de Detección de Red"
}
},
"config_confirm": {
"title": "Confirmar configuración",
"description": "¡Hola, **{nick_name}**! Por favor, confirme la última información de configuración y haga clic en \"Enviar\" para finalizar la configuración.\r\nLa integración se volverá a cargar con la nueva configuración.\r\n\r\nIdioma de la integración:\t{lang_new}\r\nApodo de usuario:\t{nick_name_new}\r\nModo de depuración de Action:\t{action_debug}\r\nOcultar entidades generadas no estándar:\t{hide_non_standard_entities}\r\nMostrar notificaciones de cambio de estado del dispositivo:\t{display_devices_changed_notify}\r\nCambios de dispositivos:\t{devices_add} dispositivos agregados, {devices_remove} dispositivos eliminados\r\nCambios en las reglas de conversión:\t{trans_rules_count} reglas en total, {trans_rules_count_success} reglas actualizadas",
@ -174,7 +186,11 @@
"no_central_device": "【Modo de puerta de enlace central】Se requiere una puerta de enlace Xiaomi disponible en la red local donde se encuentra Home Assistant. Verifique si el hogar seleccionado cumple con este requisito.",
"mdns_discovery_error": "Error en el servicio de descubrimiento de dispositivos locales.",
"update_config_error": "Error al actualizar la información de configuración.",
"not_confirm": "No se ha confirmado la opción de modificación. Seleccione y confirme la opción antes de enviar."
"not_confirm": "No se ha confirmado la opción de modificación. Seleccione y confirme la opción antes de enviar.",
"invalid_network_addr": "Se detectó una dirección IP o HTTP no válida, por favor ingrese una dirección válida.",
"invalid_ip_addr": "Se detectó una dirección IP inaccesible, por favor ingrese una dirección IP válida.",
"invalid_http_addr": "Se detectó una dirección HTTP inaccesible, por favor ingrese una dirección HTTP válida.",
"invalid_default_addr": "La dirección de detección de red predeterminada no es accesible, por favor verifique la configuración de la red o use una dirección de detección de red personalizada."
},
"abort": {
"network_connect_error": "La configuración ha fallado. Existe un problema con la conexión de red, verifique la configuración de red del dispositivo.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Configuration de base",
"description": "### Région de connexion\r\nSélectionnez la région où se trouve votre compte Xiaomi. Vous pouvez le trouver dans `Xiaomi Home APP > Mon (situé dans le menu inférieur) > Plus de paramètres > À propos de Xiaomi Home`.\r\n### Langue\r\nChoisissez la langue utilisée pour les noms de périphériques et d'entités. Les parties de phrases sans traduction seront affichées en anglais.\r\n### Adresse de redirection de l'authentification OAuth2\r\nL'adresse de redirection de l'authentification OAuth2 est **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant doit être dans le même réseau local que le terminal de l'opération actuelle (par exemple, un ordinateur personnel) et le terminal de l'opération doit pouvoir accéder à la page d'accueil de Home Assistant via cette adresse. Sinon, l'authentification de connexion peut échouer.\r\n### Remarque\r\n- Pour les utilisateurs ayant des centaines ou plus d'appareils Mi Home, l'ajout initial de l'intégration prendra un certain temps. Veuillez être patient.\r\n- Si Home Assistant fonctionne dans un environnement Docker, veuillez vous assurer que le mode réseau Docker est réglé sur host, sinon la fonctionnalité de contrôle local peut ne pas fonctionner correctement.\r\n- La fonctionnalité de contrôle local de l'intégration a quelques dépendances. Veuillez lire attentivement le README.",
"description": "### Région de connexion\r\nSélectionnez la région où se trouve votre compte Xiaomi. Vous pouvez le trouver dans `Xiaomi Home APP > Mon (situé dans le menu inférieur) > Plus de paramètres > À propos de Xiaomi Home`.\r\n### Langue\r\nChoisissez la langue utilisée pour les noms de périphériques et d'entités. Les parties de phrases sans traduction seront affichées en anglais.\r\n### Adresse de redirection de l'authentification OAuth2\r\nL'adresse de redirection de l'authentification OAuth2 est **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant doit être dans le même réseau local que le terminal de l'opération actuelle (par exemple, un ordinateur personnel) et le terminal de l'opération doit pouvoir accéder à la page d'accueil de Home Assistant via cette adresse. Sinon, l'authentification de connexion peut échouer.\r\n### Adresse de Détection Réseau\r\nUtilisé pour vérifier si le réseau fonctionne correctement. Si non défini, l'adresse par défaut du système sera utilisée. Si la vérification de l'adresse par défaut échoue, vous pouvez essayer de saisir une adresse personnalisée.\r\n- Vous pouvez entrer plusieurs adresses de détection, séparées par des virgules, telles que `8.8.8.8,https://www.bing.com`\r\n- S'il s'agit d'une adresse IP, la détection se fera par ping. S'il s'agit d'une adresse HTTP(s), la détection se fera par une requête HTTP GET.\r\n- **Cette configuration est globale et les modifications affecteront les autres instances d'intégration. Veuillez modifier avec prudence.**\r\n### Remarque\r\n- Pour les utilisateurs ayant des centaines ou plus d'appareils Mi Home, l'ajout initial de l'intégration prendra un certain temps. Veuillez être patient.\r\n- Si Home Assistant fonctionne dans un environnement Docker, veuillez vous assurer que le mode réseau Docker est réglé sur host, sinon la fonctionnalité de contrôle local peut ne pas fonctionner correctement.\r\n- La fonctionnalité de contrôle local de l'intégration a quelques dépendances. Veuillez lire attentivement le README.",
"data": {
"cloud_server": "Région de connexion",
"integration_language": "Langue",
"oauth_redirect_url": "Adresse de redirection de l'authentification"
"oauth_redirect_url": "Adresse de redirection de l'authentification",
"network_detect_addr": "Adresse de Détection Réseau"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "Aucune maison sélectionnée.",
"no_devices": "Il n'y a pas d'appareils dans la maison sélectionnée. Veuillez sélectionner une maison avec des appareils et continuer.",
"no_filter_devices": "Les appareils filtrés sont vides. Veuillez sélectionner des critères de filtre valides et continuer.",
"no_central_device": "Le mode gateway central a besoin d'un Xiaomi Gateway disponible dans le réseau local où se trouve Home Assistant. Veuillez vérifier si la maison sélectionnée répond à cette exigence."
"no_central_device": "Le mode gateway central a besoin d'un Xiaomi Gateway disponible dans le réseau local où se trouve Home Assistant. Veuillez vérifier si la maison sélectionnée répond à cette exigence.",
"invalid_network_addr": "Adresse IP ou HTTP invalide détectée, veuillez entrer une adresse valide.",
"invalid_ip_addr": "Adresse IP inaccessible détectée, veuillez entrer une adresse IP valide.",
"invalid_http_addr": "Adresse HTTP inaccessible détectée, veuillez entrer une adresse HTTP valide.",
"invalid_default_addr": "L'adresse de détection réseau par défaut est inaccessible, veuillez vérifier la configuration réseau ou utiliser une adresse de détection réseau personnalisée."
},
"abort": {
"network_connect_error": "La configuration a échoué. Erreur de connexion réseau. Veuillez vérifier la configuration du réseau de l'appareil.",
@ -152,6 +157,13 @@
"enable_subscribe": "Activer la souscription"
}
},
"network_detect_config": {
"title": "Configuration de Détection Réseau",
"description": "## Introduction à l'Utilisation\r\n### Adresse de Détection Réseau\r\nUtilisé pour vérifier si le réseau fonctionne correctement. Si non défini, l'adresse par défaut du système sera utilisée. Si la vérification de l'adresse par défaut échoue, vous pouvez essayer de saisir une adresse personnalisée.\r\n- Vous pouvez entrer plusieurs adresses de détection, séparées par des virgules, telles que `8.8.8.8,https://www.bing.com`\r\n- S'il s'agit d'une adresse IP, la détection se fera par ping. S'il s'agit d'une adresse HTTP(s), la détection se fera par une requête HTTP GET.\r\n- **Cette configuration est globale et les modifications affecteront les autres instances d'intégration. Veuillez modifier avec prudence.**",
"data": {
"network_detect_addr": "Adresse de Détection Réseau"
}
},
"config_confirm": {
"title": "Confirmer la configuration",
"description": "**{nick_name}** Bonjour ! Veuillez confirmer les dernières informations de configuration et cliquer sur \"Soumettre\".\r\nL'intégration rechargera avec la nouvelle configuration.\r\n\r\nLangue d'intégration : {lang_new}\r\nPseudo utilisateur : {nick_name_new}\r\nMode de débogage d'action : {action_debug}\r\nMasquer les entités générées non standard : {hide_non_standard_entities}\r\nAfficher les notifications de changement d'état de l'appareil:\t{display_devices_changed_notify}\r\nModifications des appareils : Ajouter **{devices_add}** appareils, supprimer **{devices_remove}** appareils\r\nModifications des règles de conversion : **{trans_rules_count}** règles au total, mise à jour de **{trans_rules_count_success}** règles",
@ -174,7 +186,11 @@
"no_central_device": "Le mode passerelle centrale nécessite une passerelle Xiaomi disponible dans le réseau local où est installé Home Assistant. Veuillez vérifier que la maison sélectionnée répond à cette exigence.",
"mdns_discovery_error": "Service de découverte de périphérique local en panne.",
"update_config_error": "Échec de la mise à jour des informations de configuration.",
"not_confirm": "La modification n'a pas été confirmée. Veuillez cocher la case de confirmation avant de soumettre."
"not_confirm": "La modification n'a pas été confirmée. Veuillez cocher la case de confirmation avant de soumettre.",
"invalid_network_addr": "Adresse IP ou HTTP invalide détectée, veuillez entrer une adresse valide.",
"invalid_ip_addr": "Adresse IP inaccessible détectée, veuillez entrer une adresse IP valide.",
"invalid_http_addr": "Adresse HTTP inaccessible détectée, veuillez entrer une adresse HTTP valide.",
"invalid_default_addr": "L'adresse de détection réseau par défaut est inaccessible, veuillez vérifier la configuration réseau ou utiliser une adresse de détection réseau personnalisée."
},
"abort": {
"network_connect_error": "Échec de la configuration. Problème de connexion réseau, veuillez vérifier la configuration du périphérique.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "基本設定",
"description": "### ログインエリア\r\nXiaomi アカウントが属する地域を選択します。 `Xiaomi Home アプリ> マイ(ボトムメニューにあります)> その他の設定> Xiaomi Home について` で確認できます。\r\n### 言語\r\nデバイスおよびエンティティ名に使用される言語を選択します。一部の翻訳が欠落している場合、英語が表示されます。\r\n### OAuth2 認証リダイレクトアドレス\r\nOAuth2 認証リダイレクトアドレスは **[http://homeassistant.local:8123](http://homeassistant.local:8123)** です。Home Assistant は、現在の操作端末(たとえば、パーソナルコンピュータ)と同じ LAN 内にあり、操作端末がこのアドレスで Home Assistant ホームページにアクセスできる場合にのみログイン認証が成功する場合があります。\r\n### 注意事項\r\n- 数百台以上のMi Homeデバイスをお持ちのユーザーの場合、統合の初回追加には時間がかかります。しばらくお待ちください。\r\n- Home AssistantがDocker環境で実行されている場合は、Dockerのネットワークモードがhostに設定されていることを確認してください。そうしないと、ローカル制御機能が正しく動作しない可能性があります。\r\n- 統合のローカル制御機能にはいくつかの依存関係があります。READMEを注意深く読んでください。",
"description": "### ログインエリア\r\nXiaomi アカウントが属する地域を選択します。 `Xiaomi Home アプリ> マイ(ボトムメニューにあります)> その他の設定> Xiaomi Home について` で確認できます。\r\n### 言語\r\nデバイスおよびエンティティ名に使用される言語を選択します。一部の翻訳が欠落している場合、英語が表示されます。\r\n### OAuth2 認証リダイレクトアドレス\r\nOAuth2 認証リダイレクトアドレスは **[http://homeassistant.local:8123](http://homeassistant.local:8123)** です。Home Assistant は、現在の操作端末(たとえば、パーソナルコンピュータ)と同じ LAN 内にあり、操作端末がこのアドレスで Home Assistant ホームページにアクセスできる場合にのみログイン認証が成功する場合があります。\r\n### ネットワーク検出アドレス\r\nネットワークが正常に機能しているかどうかを確認するために使用されます。設定されていない場合、システムのデフォルトアドレスが使用されます。デフォルトアドレスのチェックが失敗した場合は、カスタムアドレスを入力してみてください。\r\n- 複数の検出アドレスを入力できます。アドレスはコンマで区切ります。例:`8.8.8.8,https://www.bing.com`\r\n- IPアドレスの場合、pingによる検出が行われます。HTTP(s)アドレスの場合、HTTP GETリクエストによる検出が行われます。\r\n- **この設定はグローバルであり、変更は他の統合インスタンスに影響を与えます。慎重に変更してください。**\r\n### 注意事項\r\n- 数百台以上のMi Homeデバイスをお持ちのユーザーの場合、統合の初回追加には時間がかかります。しばらくお待ちください。\r\n- Home AssistantがDocker環境で実行されている場合は、Dockerのネットワークモードがhostに設定されていることを確認してください。そうしないと、ローカル制御機能が正しく動作しない可能性があります。\r\n- 統合のローカル制御機能にはいくつかの依存関係があります。READMEを注意深く読んでください。",
"data": {
"cloud_server": "ログインエリア",
"integration_language": "言語",
"oauth_redirect_url": "認証リダイレクトアドレス"
"oauth_redirect_url": "認証リダイレクトアドレス",
"network_detect_addr": "ネットワーク検出アドレス"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "家庭が選択されていません。",
"no_devices": "選択した家庭にはデバイスがありません。デバイスがある家庭を選択して続行してください。",
"no_filter_devices": "フィルタリングされたデバイスが空です。有効なフィルター条件を選択して続行してください。",
"no_central_device": "【中央ゲートウェイモード】Home Assistant が存在する LAN 内に使用可能な Xiaomi 中央ゲートウェイがある必要があります。選択された家庭がこの要件を満たしているかどうかを確認してください。"
"no_central_device": "【中央ゲートウェイモード】Home Assistant が存在する LAN 内に使用可能な Xiaomi 中央ゲートウェイがある必要があります。選択された家庭がこの要件を満たしているかどうかを確認してください。",
"invalid_network_addr": "無効なIPアドレスまたはHTTPアドレスが検出されました。有効なアドレスを入力してください。",
"invalid_ip_addr": "アクセスできないIPアドレスが検出されました。有効なIPアドレスを入力してください。",
"invalid_http_addr": "アクセスできないHTTPアドレスが検出されました。有効なHTTPアドレスを入力してください。",
"invalid_default_addr": "デフォルトのネットワーク検出アドレスにアクセスできません。ネットワーク設定を確認するか、カスタムネットワーク検出アドレスを使用してください。"
},
"abort": {
"network_connect_error": "設定に失敗しました。ネットワーク接続に異常があります。デバイスのネットワーク設定を確認してください。",
@ -152,6 +157,13 @@
"enable_subscribe": "LANサブスクリプションを有効にする"
}
},
"network_detect_config": {
"title": "ネットワーク検出設定",
"description": "## 使用方法の紹介\r\n### ネットワーク検出アドレス\r\nネットワークが正常に機能しているかどうかを確認するために使用されます。設定されていない場合、システムのデフォルトアドレスが使用されます。デフォルトアドレスのチェックが失敗した場合は、カスタムアドレスを入力してみてください。\r\n- 複数の検出アドレスを入力できます。アドレスはコンマで区切ります。例:`8.8.8.8,https://www.bing.com`\r\n- IPアドレスの場合、pingによる検出が行われます。HTTP(s)アドレスの場合、HTTP GETリクエストによる検出が行われます。\r\n- **この設定はグローバルであり、変更は他の統合インスタンスに影響を与えます。慎重に変更してください。**",
"data": {
"network_detect_addr": "ネットワーク検出アドレス"
}
},
"config_confirm": {
"title": "構成を確認する",
"description": "**{nick_name}** さん、こんにちは! 最新の構成情報を確認してください。[送信] をクリックして、更新された構成を使用して再度読み込みます。\r\n\r\n統合言語\t{lang_new}\r\nユーザー名\t{nick_name_new}\r\nAction デバッグモード:\t{action_debug}\r\n非標準生成エンティティを非表示にする\t{hide_non_standard_entities}\r\nデバイスの状態変化通知を表示:\t{display_devices_changed_notify}\r\nデバイス変更\t追加 **{devices_add}** 個のデバイス、削除 **{devices_remove}** 個のデバイス\r\n変換ルール変更\t合計 **{trans_rules_count}** 個の規則、更新 **{trans_rules_count_success}** 個の規則",
@ -174,7 +186,11 @@
"no_central_device": "【中枢ゲートウェイモード】には、Home Assistantが存在するローカルネットワークに使用可能なXiaomi Central Hub Gatewayが存在する必要があります。選択された家庭がこの要件を満たしているかどうかを確認してください。",
"mdns_discovery_error": "ローカルデバイス発見サービスが異常です。",
"update_config_error": "構成情報の更新に失敗しました。",
"not_confirm": "変更を確認していません。確認をチェックしてから送信してください。"
"not_confirm": "変更を確認していません。確認をチェックしてから送信してください。",
"invalid_network_addr": "無効なIPアドレスまたはHTTPアドレスが検出されました。有効なアドレスを入力してください。",
"invalid_ip_addr": "アクセスできないIPアドレスが検出されました。有効なIPアドレスを入力してください。",
"invalid_http_addr": "アクセスできないHTTPアドレスが検出されました。有効なHTTPアドレスを入力してください。",
"invalid_default_addr": "デフォルトのネットワーク検出アドレスにアクセスできません。ネットワーク設定を確認するか、カスタムネットワーク検出アドレスを使用してください。"
},
"abort": {
"network_connect_error": "構成に失敗しました。ネットワーク接続に異常があります。デバイスのネットワーク構成を確認してください。",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Basisconfiguratie",
"description": "### Inlogregio\r\nSelecteer de regio van uw Xiaomi-account. U kunt deze vinden in de Xiaomi Home APP > Profiel (onderin het menu) > Extra instellingen > Over Xiaomi Home.\r\n### Taal\r\nKies de taal voor de apparaats- en entiteitsnamen. Sommige zinnen zonder vertaling worden in het Engels weergegeven.\r\n### OAuth2 Omleidings-URL\r\nHet OAuth2 authenticatie omleidingsadres is **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant moet zich in hetzelfde lokale netwerk bevinden als de huidige werkterminal (bijv. de persoonlijke computer) en de werkterminal moet toegang hebben tot de startpagina van Home Assistant via dit adres. Anders kan de inlogauthenticatie mislukken.\r\n### Opmerking\r\n- Voor gebruikers met honderden of meer Mi Home-apparaten kan het aanvankelijke toevoegen van de integratie enige tijd duren. Wees geduldig.\r\n- Als Home Assistant draait in een Docker-omgeving, zorg er dan voor dat de Docker-netwerkmodus is ingesteld op host, anders werkt de lokale controlefunctionaliteit mogelijk niet correct.\r\n- De lokale controlefunctionaliteit van de integratie heeft enkele afhankelijkheden. Lees het README zorgvuldig.",
"description": "### Inlogregio\r\nSelecteer de regio van uw Xiaomi-account. U kunt deze vinden in de Xiaomi Home APP > Profiel (onderin het menu) > Extra instellingen > Over Xiaomi Home.\r\n### Taal\r\nKies de taal voor de apparaats- en entiteitsnamen. Sommige zinnen zonder vertaling worden in het Engels weergegeven.\r\n### OAuth2 Omleidings-URL\r\nHet OAuth2 authenticatie omleidingsadres is **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant moet zich in hetzelfde lokale netwerk bevinden als de huidige werkterminal (bijv. de persoonlijke computer) en de werkterminal moet toegang hebben tot de startpagina van Home Assistant via dit adres. Anders kan de inlogauthenticatie mislukken.\r\n### Netwerkdetectieadres\r\nWordt gebruikt om te controleren of het netwerk correct functioneert. Als dit niet is ingesteld, wordt het standaardadres van het systeem gebruikt. Als de standaardadrescontrole mislukt, kunt u proberen een aangepast adres in te voeren.\r\n- U kunt meerdere detectieadressen invoeren, gescheiden door komma's, zoals `8.8.8.8,https://www.bing.com`\r\n- Als het een IP-adres is, wordt de detectie uitgevoerd via ping. Als het een HTTP(s)-adres is, wordt de detectie uitgevoerd via een HTTP GET-verzoek.\r\n- **Deze configuratie is globaal en wijzigingen zullen andere integratie-instanties beïnvloeden. Wijzig met voorzichtigheid.**\r\n### Opmerking\r\n- Voor gebruikers met honderden of meer Mi Home-apparaten kan het aanvankelijke toevoegen van de integratie enige tijd duren. Wees geduldig.\r\n- Als Home Assistant draait in een Docker-omgeving, zorg er dan voor dat de Docker-netwerkmodus is ingesteld op host, anders werkt de lokale controlefunctionaliteit mogelijk niet correct.\r\n- De lokale controlefunctionaliteit van de integratie heeft enkele afhankelijkheden. Lees het README zorgvuldig.",
"data": {
"cloud_server": "Inlogregio",
"integration_language": "Taal",
"oauth_redirect_url": "OAuth2 Omleidings-URL"
"oauth_redirect_url": "OAuth2 Omleidings-URL",
"network_detect_addr": "Netwerkdetectieadres"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "Geen huis geselecteerd.",
"no_devices": "Er zijn geen apparaten in het geselecteerde huis. Selecteer een huis met apparaten en ga verder.",
"no_filter_devices": "Gefilterde apparaten zijn leeg. Selecteer geldige filtercriteria en ga verder.",
"no_central_device": "[Centrale Hub Gateway Modus] vereist een beschikbare Xiaomi centrale hubgateway in het lokale netwerk waar Home Assistant zich bevindt. Controleer of het geselecteerde huis aan deze vereiste voldoet."
"no_central_device": "[Centrale Hub Gateway Modus] vereist een beschikbare Xiaomi centrale hubgateway in het lokale netwerk waar Home Assistant zich bevindt. Controleer of het geselecteerde huis aan deze vereiste voldoet.",
"invalid_network_addr": "Ongeldig IP-adres of HTTP-adres gedetecteerd, voer een geldig adres in.",
"invalid_ip_addr": "Onbereikbaar IP-adres gedetecteerd, voer een geldig IP-adres in.",
"invalid_http_addr": "Onbereikbaar HTTP-adres gedetecteerd, voer een geldig HTTP-adres in.",
"invalid_default_addr": "Standaard netwerkdetectieadres is onbereikbaar, controleer de netwerkconfiguratie of gebruik een aangepast netwerkdetectieadres."
},
"abort": {
"network_connect_error": "Configuratie mislukt. De netwerkverbinding is abnormaal. Controleer de netwerkinstellingen van de apparatuur.",
@ -152,6 +157,13 @@
"enable_subscribe": "Zet LAN-abonnement aan"
}
},
"network_detect_config": {
"title": "Netwerkdetectieconfiguratie",
"description": "## Gebruiksinstructie\r\n### Netwerkdetectieadres\r\nWordt gebruikt om te controleren of het netwerk correct functioneert. Als dit niet is ingesteld, wordt het standaardadres van het systeem gebruikt. Als de standaardadrescontrole mislukt, kunt u proberen een aangepast adres in te voeren.\r\n- U kunt meerdere detectieadressen invoeren, gescheiden door komma's, zoals `8.8.8.8,https://www.bing.com`\r\n- Als het een IP-adres is, wordt de detectie uitgevoerd via ping. Als het een HTTP(s)-adres is, wordt de detectie uitgevoerd via een HTTP GET-verzoek.\r\n- **Deze configuratie is globaal en wijzigingen zullen andere integratie-instanties beïnvloeden. Wijzig met voorzichtigheid.**",
"data": {
"network_detect_addr": "Netwerkdetectieadres"
}
},
"config_confirm": {
"title": "Bevestig Configuratie",
"description": "Hallo **{nick_name}**, bevestig alstublieft de nieuwste configuratie-informatie en klik vervolgens op INDENKEN.\r\nDe integratie zal opnieuw laden met de bijgewerkte configuratie.\r\n\r\nIntegratietaal: \t{lang_new}\r\nBijnaam: \t{nick_name_new}\r\nDebugmodus voor actie: \t{action_debug}\r\nVerberg niet-standaard gemaakte entiteiten: \t{hide_non_standard_entities}\r\nApparaatstatuswijzigingen weergeven:\t{display_devices_changed_notify}\r\nWijzigingen in apparaten: \tVoeg **{devices_add}** apparaten toe, Verwijder **{devices_remove}** apparaten\r\nWijzigingen in transformateregels: \tEr zijn in totaal **{trans_rules_count}** regels, en **{trans_rules_count_success}** regels zijn bijgewerkt",
@ -174,7 +186,11 @@
"no_central_device": "[Centrale Hub Gateway Modus] vereist een beschikbare Xiaomi centrale hubgateway in het lokale netwerk waar Home Assistant zich bevindt. Controleer of het geselecteerde huis aan deze vereiste voldoet.",
"mdns_discovery_error": "Lokaal apparaatsontdekkingsservice-exceptie.",
"update_config_error": "Mislukt bij het bijwerken van configuratie-informatie.",
"not_confirm": "Wijzigingen zijn niet bevestigd. Bevestig de wijziging voordat u deze indient."
"not_confirm": "Wijzigingen zijn niet bevestigd. Bevestig de wijziging voordat u deze indient.",
"invalid_network_addr": "Ongeldig IP-adres of HTTP-adres gedetecteerd, voer een geldig adres in.",
"invalid_ip_addr": "Onbereikbaar IP-adres gedetecteerd, voer een geldig IP-adres in.",
"invalid_http_addr": "Onbereikbaar HTTP-adres gedetecteerd, voer een geldig HTTP-adres in.",
"invalid_default_addr": "Standaard netwerkdetectieadres is onbereikbaar, controleer de netwerkconfiguratie of gebruik een aangepast netwerkdetectieadres."
},
"abort": {
"network_connect_error": "Configuratie mislukt. De netwerkverbinding is abnormaal. Controleer de netwerkinstellingen van de apparatuur.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Configuração básica",
"description": "### Região de Login\r\nSelecione a região da sua conta Xiaomi. Você pode encontrá-la no aplicativo Xiaomi Home > Perfil (localizado no menu inferior) > Configurações adicionais > Sobre o Xiaomi Home.\r\n### Idioma\r\nSelecione o idioma dos nomes dos dispositivos e entidades. Algumas frases sem tradução serão exibidas em inglês.\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento da autenticação OAuth2 é **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. O Home Assistant precisa estar na mesma rede local que o terminal atual (por exemplo, o computador pessoal) e o terminal precisa acessar a página inicial do Home Assistant através desse endereço. Caso contrário, a autenticação de login pode falhar.\r\n### Observações\r\n- Para usuários com centenas ou mais dispositivos Mi Home, a adição inicial da integração levará algum tempo. Seja paciente.\r\n- Se o Home Assistant estiver sendo executado em um ambiente Docker, certifique-se de que o modo de rede do Docker esteja definido como host, caso contrário a funcionalidade de controle local pode não funcionar corretamente.\r\n- A funcionalidade de controle local da integração tem algumas dependências. Por favor, leia o README atentamente.",
"description": "### Região de Login\r\nSelecione a região da sua conta Xiaomi. Você pode encontrá-la no aplicativo Xiaomi Home > Perfil (localizado no menu inferior) > Configurações adicionais > Sobre o Xiaomi Home.\r\n### Idioma\r\nSelecione o idioma dos nomes dos dispositivos e entidades. Algumas frases sem tradução serão exibidas em inglês.\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento da autenticação OAuth2 é **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. O Home Assistant precisa estar na mesma rede local que o terminal atual (por exemplo, o computador pessoal) e o terminal precisa acessar a página inicial do Home Assistant através desse endereço. Caso contrário, a autenticação de login pode falhar.\r\n### Endereço de Detecção de Rede\r\nUsado para verificar se a rede está funcionando corretamente. Se não for definido, o endereço padrão do sistema será usado. Se a verificação do endereço padrão falhar, você pode tentar inserir um endereço personalizado.\r\n- Você pode inserir vários endereços de detecção, separados por vírgulas, como `8.8.8.8,https://www.bing.com`\r\n- Se for um endereço IP, a detecção será feita via ping. Se for um endereço HTTP(s), a detecção será feita via solicitação HTTP GET.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Observações\r\n- Para usuários com centenas ou mais dispositivos Mi Home, a adição inicial da integração levará algum tempo. Seja paciente.\r\n- Se o Home Assistant estiver sendo executado em um ambiente Docker, certifique-se de que o modo de rede do Docker esteja definido como host, caso contrário a funcionalidade de controle local pode não funcionar corretamente.\r\n- A funcionalidade de controle local da integração tem algumas dependências. Por favor, leia o README atentamente.",
"data": {
"cloud_server": "Região de Login",
"integration_language": "Idioma",
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
"oauth_redirect_url": "URL de Redirecionamento OAuth2",
"network_detect_addr": "Endereço de Detecção de Rede"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "Nenhuma casa selecionada.",
"no_devices": "Não há dispositivos na casa selecionada. Por favor, selecione uma casa com dispositivos e continue.",
"no_filter_devices": "Os dispositivos filtrados estão vazios. Por favor, selecione critérios de filtro válidos e continue.",
"no_central_device": "[Modo Gateway Central] requer um gateway central Xiaomi disponível na rede local onde o Home Assistant está. Verifique se a casa selecionada atende a esse requisito."
"no_central_device": "[Modo Gateway Central] requer um gateway central Xiaomi disponível na rede local onde o Home Assistant está. Verifique se a casa selecionada atende a esse requisito.",
"invalid_network_addr": "Endereço IP ou HTTP inválido detectado, por favor insira um endereço válido.",
"invalid_ip_addr": "Endereço IP inacessível detectado, por favor insira um endereço IP válido.",
"invalid_http_addr": "Endereço HTTP inacessível detectado, por favor insira um endereço HTTP válido.",
"invalid_default_addr": "O endereço de detecção de rede padrão está inacessível, por favor verifique a configuração da rede ou use um endereço de detecção de rede personalizado."
},
"abort": {
"network_connect_error": "Configuração falhou. A conexão de rede está anormal. Verifique a configuração de rede do equipamento.",
@ -152,6 +157,13 @@
"enable_subscribe": "Habilitar assinatura LAN"
}
},
"network_detect_config": {
"title": "Configuração de Detecção de Rede",
"description": "## Introdução ao Uso\r\n### Endereço de Detecção de Rede\r\nUsado para verificar se a rede está funcionando corretamente. Se não for definido, o endereço padrão do sistema será usado. Se a verificação do endereço padrão falhar, você pode tentar inserir um endereço personalizado.\r\n- Você pode inserir vários endereços de detecção, separados por vírgulas, como `8.8.8.8,https://www.bing.com`\r\n- Se for um endereço IP, a detecção será feita via ping. Se for um endereço HTTP(s), a detecção será feita via solicitação HTTP GET.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**",
"data": {
"network_detect_addr": "Endereço de Detecção de Rede"
}
},
"config_confirm": {
"title": "Confirmar Configuração",
"description": "Olá **{nick_name}**, confirme as informações da configuração mais recente e depois clique em ENVIAR.\r\nA integração será recarregada com a configuração atualizada.\r\n\r\nIdioma da Integração:\t{lang_new}\r\nApelido:\t{nick_name_new}\r\nModo de depuração para ação:\t{action_debug}\r\nOcultar entidades não padrão criadas:\t{hide_non_standard_entities}\r\nExibir notificações de mudança de status do dispositivo:\t{display_devices_changed_notify}\r\nAlterações de Dispositivos:\tAdicionar **{devices_add}** dispositivos, Remover **{devices_remove}** dispositivos\r\nAlteração nas Regras de Transformação:\tUm total de **{trans_rules_count}** regras, e **{trans_rules_count_success}** regras atualizadas",
@ -174,7 +186,11 @@
"no_central_device": "[Modo Gateway Central] requer um gateway central Xiaomi disponível na rede local onde o Home Assistant está. Verifique se a casa selecionada atende a esse requisito.",
"mdns_discovery_error": "Exceção no serviço de descoberta de dispositivos locais.",
"update_config_error": "Falha ao atualizar as informações de configuração.",
"not_confirm": "As alterações não foram confirmadas. Por favor, confirme a mudança antes de enviar."
"not_confirm": "As alterações não foram confirmadas. Por favor, confirme a mudança antes de enviar.",
"invalid_network_addr": "Endereço IP ou HTTP inválido detectado, por favor insira um endereço válido.",
"invalid_ip_addr": "Endereço IP inacessível detectado, por favor insira um endereço IP válido.",
"invalid_http_addr": "Endereço HTTP inacessível detectado, por favor insira um endereço HTTP válido.",
"invalid_default_addr": "O endereço de detecção de rede padrão está inacessível, por favor verifique a configuração da rede ou use um endereço de detecção de rede personalizado."
},
"abort": {
"network_connect_error": "Configuração falhou. A conexão de rede está anormal. Verifique a configuração da rede do equipamento.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Configuração Básica",
"description": "### Região de Login\r\nSelecione a região da sua conta Xiaomi. Pode encontrá-la na aplicação Xiaomi Home > Perfil (menu inferior) > Configurações adicionais > Sobre o Xiaomi Home.\r\n### Idioma\r\nSelecione o idioma para os nomes de dispositivos e entidades. Algumas frases sem tradução serão apresentadas em inglês.\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento para a autenticação OAuth2 é **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. O Home Assistant deve estar na mesma rede local que o terminal atual (por exemplo, o computador pessoal) e esse terminal deve conseguir aceder à página inicial do Home Assistant através deste endereço. Caso contrário, a autenticação de login pode falhar.\r\n### Notas\r\n- Para utilizadores com centenas (ou mais) de dispositivos Mi Home, a adição inicial da integração demorará algum tempo. Seja paciente.\r\n- Se o Home Assistant estiver a ser executado num ambiente Docker, assegure-se de que o modo de rede do Docker está configurado como host; caso contrário, a funcionalidade de controlo local pode não funcionar corretamente.\r\n- A funcionalidade de controlo local da integração tem algumas dependências. Leia cuidadosamente o README.",
"description": "### Região de Login\r\nSelecione a região da sua conta Xiaomi. Pode encontrá-la na aplicação Xiaomi Home > Perfil (menu inferior) > Configurações adicionais > Sobre o Xiaomi Home.\r\n### Idioma\r\nSelecione o idioma para os nomes de dispositivos e entidades. Algumas frases sem tradução serão apresentadas em inglês.\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento para a autenticação OAuth2 é **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. O Home Assistant deve estar na mesma rede local que o terminal atual (por exemplo, o computador pessoal) e esse terminal deve conseguir aceder à página inicial do Home Assistant através deste endereço. Caso contrário, a autenticação de login pode falhar.\r\n### Endereço de Detecção de Rede\r\nUsado para verificar se a rede está funcionando corretamente. Se não for definido, o endereço padrão do sistema será usado. Se a verificação do endereço padrão falhar, você pode tentar inserir um endereço personalizado.\r\n- Você pode inserir vários endereços de detecção, separados por vírgulas, como `8.8.8.8,https://www.bing.com`\r\n- Se for um endereço IP, a detecção será feita via ping. Se for um endereço HTTP(s), a detecção será feita via solicitação HTTP GET.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Notas\r\n- Para utilizadores com centenas (ou mais) de dispositivos Mi Home, a adição inicial da integração demorará algum tempo. Seja paciente.\r\n- Se o Home Assistant estiver a ser executado num ambiente Docker, assegure-se de que o modo de rede do Docker está configurado como host; caso contrário, a funcionalidade de controlo local pode não funcionar corretamente.\r\n- A funcionalidade de controlo local da integração tem algumas dependências. Leia cuidadosamente o README.",
"data": {
"cloud_server": "Região de Login",
"integration_language": "Idioma",
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
"oauth_redirect_url": "URL de Redirecionamento OAuth2",
"network_detect_addr": "Endereço de Detecção de Rede"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "Nenhuma casa selecionada.",
"no_devices": "Não há dispositivos na casa selecionada. Por favor, selecione uma casa com dispositivos e continue.",
"no_filter_devices": "Os dispositivos filtrados estão vazios. Por favor, selecione critérios de filtro válidos e continue.",
"no_central_device": "O [Modo Gateway Central] requer um gateway central Xiaomi disponível na rede local onde o Home Assistant está. Verifique se a casa selecionada cumpre este requisito."
"no_central_device": "O [Modo Gateway Central] requer um gateway central Xiaomi disponível na rede local onde o Home Assistant está. Verifique se a casa selecionada cumpre este requisito.",
"invalid_network_addr": "Endereço IP ou HTTP inválido detectado, por favor insira um endereço válido.",
"invalid_ip_addr": "Endereço IP inacessível detectado, por favor insira um endereço IP válido.",
"invalid_http_addr": "Endereço HTTP inacessível detectado, por favor insira um endereço HTTP válido.",
"invalid_default_addr": "O endereço de detecção de rede padrão está inacessível, por favor verifique a configuração da rede ou use um endereço de detecção de rede personalizado."
},
"abort": {
"network_connect_error": "A configuração falhou. A ligação de rede é anormal. Verifique a configuração de rede do equipamento.",
@ -152,6 +157,13 @@
"enable_subscribe": "Ativar subscrição LAN"
}
},
"network_detect_config": {
"title": "Configuração de Detecção de Rede",
"description": "## Introdução ao Uso\r\n### Endereço de Detecção de Rede\r\nUsado para verificar se a rede está funcionando corretamente. Se não for definido, o endereço padrão do sistema será usado. Se a verificação do endereço padrão falhar, você pode tentar inserir um endereço personalizado.\r\n- Você pode inserir vários endereços de detecção, separados por vírgulas, como `8.8.8.8,https://www.bing.com`\r\n- Se for um endereço IP, a detecção será feita via ping. Se for um endereço HTTP(s), a detecção será feita via solicitação HTTP GET.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**",
"data": {
"network_detect_addr": "Endereço de Detecção de Rede"
}
},
"config_confirm": {
"title": "Confirmar Configuração",
"description": "Olá **{nick_name}**, confirme a informação da configuração mais recente e depois clique em SUBMETER.\r\nA integração será recarregada com a configuração atualizada.\r\n\r\nIdioma da Integração:\t{lang_new}\r\nAlcunha:\t{nick_name_new}\r\nModo de depuração de ação:\t{action_debug}\r\nOcultar entidades não padrão:\t{hide_non_standard_entities}\r\nExibir notificações de mudança de status do dispositivo:\t{display_devices_changed_notify}\r\nAlterações aos Dispositivos:\tAdicionar **{devices_add}** dispositivos, Remover **{devices_remove}** dispositivos\r\nAlteração das Regras de Transformação:\tExistem **{trans_rules_count}** regras no total, com **{trans_rules_count_success}** regras atualizadas",
@ -174,7 +186,11 @@
"no_central_device": "O [Modo Gateway Central] requer um gateway central Xiaomi disponível na rede local onde o Home Assistant está. Verifique se a casa selecionada cumpre este requisito.",
"mdns_discovery_error": "Exceção no serviço de descoberta de dispositivos locais.",
"update_config_error": "Não foi possível atualizar a informação de configuração.",
"not_confirm": "As alterações não foram confirmadas. Por favor, confirme a alteração antes de submeter."
"not_confirm": "As alterações não foram confirmadas. Por favor, confirme a alteração antes de submeter.",
"invalid_network_addr": "Endereço IP ou HTTP inválido detectado, por favor insira um endereço válido.",
"invalid_ip_addr": "Endereço IP inacessível detectado, por favor insira um endereço IP válido.",
"invalid_http_addr": "Endereço HTTP inacessível detectado, por favor insira um endereço HTTP válido.",
"invalid_default_addr": "O endereço de detecção de rede padrão está inacessível, por favor verifique a configuração da rede ou use um endereço de detecção de rede personalizado."
},
"abort": {
"network_connect_error": "A configuração falhou. A ligação de rede é anormal. Verifique a configuração da rede do equipamento.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "Основные настройки",
"description": "### Регион входа в систему\r\nВыберите регион, в котором находится ваша учетная запись Xiaomi. Вы можете узнать об этом в `Xiaomi Home> Мой (в нижнем меню)> Дополнительные настройки> О Xiaomi Home`.\r\n### Язык\r\nВыберите язык, используемый для имен устройств и сущностей. Части предложений, которые не имеют перевода, будут отображаться на английском языке.\r\n### Адрес перенаправления для аутентификации OAuth2\r\nАдрес перенаправления для аутентификации OAuth2 - ** [http: //homeassistant.local: 8123] (http: //homeassistant.local: 8123) **, Home Assistant должен находиться в одной локальной сети с текущим терминалом (например, персональный компьютер), и терминал должен иметь доступ к домашней странице Home Assistant по этому адресу, в противном случае аутентификация входа может завершиться неудачно.\r\n### Примечание\r\n- Для пользователей с сотнями или более устройств Mi Home первоначальное добавление интеграции займет некоторое время. Пожалуйста, будьте терпеливы.\r\n- Если Home Assistant работает в среде Docker, убедитесь, что сетевой режим Docker установлен на host, иначе функция локального управления может работать неправильно.\r\n- Функция локального управления интеграции имеет некоторые зависимости. Пожалуйста, внимательно прочитайте README.",
"description": "### Регион входа в систему\r\nВыберите регион, в котором находится ваша учетная запись Xiaomi. Вы можете узнать об этом в `Xiaomi Home> Мой (в нижнем меню)> Дополнительные настройки> О Xiaomi Home`.\r\n### Язык\r\nВыберите язык, используемый для имен устройств и сущностей. Части предложений, которые не имеют перевода, будут отображаться на английском языке.\r\n### Адрес перенаправления для аутентификации OAuth2\r\nАдрес перенаправления для аутентификации OAuth2 - ** [http: //homeassistant.local: 8123] (http: //homeassistant.local: 8123) **, Home Assistant должен находиться в одной локальной сети с текущим терминалом (например, персональный компьютер), и терминал должен иметь доступ к домашней странице Home Assistant по этому адресу, в противном случае аутентификация входа может завершиться неудачно.\r\n### Адрес Обнаружения Сети\r\nИспользуется для проверки работоспособности сети. Если не задано, будет использоваться адрес по умолчанию. Если проверка адреса по умолчанию не удалась, вы можете попробовать ввести пользовательский адрес.\r\n- Вы можете ввести несколько адресов для проверки, разделенных запятыми, например `8.8.8.8,https://www.bing.com`\r\n- Если это IP-адрес, проверка будет выполняться с помощью ping. Если это HTTP(s)-адрес, проверка будет выполняться с помощью HTTP GET запроса.\r\n- **Эта конфигурация является глобальной, и изменения повлияют на другие экземпляры интеграции. Пожалуйста, изменяйте с осторожностью.**\r\n### Примечание\r\n- Для пользователей с сотнями или более устройств Mi Home первоначальное добавление интеграции займет некоторое время. Пожалуйста, будьте терпеливы.\r\n- Если Home Assistant работает в среде Docker, убедитесь, что сетевой режим Docker установлен на host, иначе функция локального управления может работать неправильно.\r\n- Функция локального управления интеграции имеет некоторые зависимости. Пожалуйста, внимательно прочитайте README.",
"data": {
"cloud_server": "Регион входа в систему",
"integration_language": "Язык",
"oauth_redirect_url": "Адрес перенаправления для аутентификации OAuth2"
"oauth_redirect_url": "Адрес перенаправления для аутентификации OAuth2",
"network_detect_addr": "Адрес Обнаружения Сети"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "Не выбрана домашняя сеть.",
"no_devices": "В выбранном доме нет устройств. Пожалуйста, выберите дом с устройствами и продолжите.",
"no_filter_devices": "Список устройств после фильтрации пуст. Пожалуйста, выберите действительные условия фильтрации и продолжите.",
"no_central_device": "Для режима центрального шлюза Xiaomi необходимо наличие доступного центрального шлюза Xiaomi в локальной сети Home Assistant. Проверьте, соответствует ли выбранная домашняя сеть этому требованию."
"no_central_device": "Для режима центрального шлюза Xiaomi необходимо наличие доступного центрального шлюза Xiaomi в локальной сети Home Assistant. Проверьте, соответствует ли выбранная домашняя сеть этому требованию.",
"invalid_network_addr": "Обнаружен недействительный IP-адрес или HTTP-адрес, пожалуйста, введите действительный адрес.",
"invalid_ip_addr": "Обнаружен недоступный IP-адрес, пожалуйста, введите действительный IP-адрес.",
"invalid_http_addr": "Обнаружен недоступный HTTP-адрес, пожалуйста, введите действительный HTTP-адрес.",
"invalid_default_addr": "Адрес обнаружения сети по умолчанию недоступен, пожалуйста, проверьте конфигурацию сети или используйте пользовательский адрес обнаружения сети."
},
"abort": {
"network_connect_error": "Ошибка настройки. Сетевое подключение недоступно. Проверьте настройки сети устройства.",
@ -152,6 +157,13 @@
"enable_subscribe": "Включить подписку LAN"
}
},
"network_detect_config": {
"title": "Конфигурация Обнаружения Сети",
"description": "## Введение в Использование\r\n### Адрес Обнаружения Сети\r\nИспользуется для проверки работоспособности сети. Если не задано, будет использоваться адрес по умолчанию. Если проверка адреса по умолчанию не удалась, вы можете попробовать ввести пользовательский адрес.\r\n- Вы можете ввести несколько адресов для проверки, разделенных запятыми, например `8.8.8.8,https://www.bing.com`\r\n- Если это IP-адрес, проверка будет выполняться с помощью ping. Если это HTTP(s)-адрес, проверка будет выполняться с помощью HTTP GET запроса.\r\n- **Эта конфигурация является глобальной, и изменения повлияют на другие экземпляры интеграции. Пожалуйста, изменяйте с осторожностью.**",
"data": {
"network_detect_addr": "Адрес Обнаружения Сети"
}
},
"config_confirm": {
"title": "Подтверждение настройки",
"description": "**{nick_name}** Здравствуйте! Подтвердите последнюю информацию о настройке и нажмите «Отправить». Интеграция будет перезагружена с использованием обновленных настроек.\r\n\r\nЯзык интеграции:\t{lang_new}\r\nИмя пользователя:\t{nick_name_new}\r\nРежим отладки Action:\t{action_debug}\r\nСкрыть непроизводственные сущности:\t{hide_non_standard_entities}\r\nОтображать уведомления о изменении состояния устройства:\t{display_devices_changed_notify}\r\nИзменение устройства:\tДобавлено **{devices_add}** устройство, удалено **{devices_remove}** устройства\r\nИзменение правил преобразования:\tВсего **{trans_rules_count}** правил, обновлено **{trans_rules_count_success}** правил",
@ -174,7 +186,11 @@
"no_central_device": "Для режима центрального шлюза необходим существующий в локальной сети Home Assistant с доступным Xiaomi-шлюзом. Пожалуйста, проверьте, соответствует ли выбранная семья этому требованию.",
"mdns_discovery_error": "Ошибка сервиса поиска локальных устройств.",
"update_config_error": "Не удалось обновить информацию о конфигурации.",
"not_confirm": "Изменение не подтверждено. Пожалуйста, отметьте для подтверждения и отправки."
"not_confirm": "Изменение не подтверждено. Пожалуйста, отметьте для подтверждения и отправки.",
"invalid_network_addr": "Обнаружен недействительный IP-адрес или HTTP-адрес, пожалуйста, введите действительный адрес.",
"invalid_ip_addr": "Обнаружен недоступный IP-адрес, пожалуйста, введите действительный IP-адрес.",
"invalid_http_addr": "Обнаружен недоступный HTTP-адрес, пожалуйста, введите действительный HTTP-адрес.",
"invalid_default_addr": "Адрес обнаружения сети по умолчанию недоступен, пожалуйста, проверьте конфигурацию сети или используйте пользовательский адрес обнаружения сети."
},
"abort": {
"network_connect_error": "Ошибка конфигурации. Сбой сетевого подключения. Проверьте настройки сети устройства.",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "基础配置",
"description": "### 登录地区\r\n选择小米账号所在的地区。您可以在 `米家APP > 我的(位于底部菜单) > 更多设置 > 关于米家` 中查看。\r\n### 语言\r\n选择设备及实体名称所用的语言。缺少翻译的部分语句将使用英文显示。\r\n### OAuth2 认证跳转地址\r\nOAuth2 认证跳转地址为 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**Home Assistant 需要与当前操作终端(例如,个人电脑)在同一局域网内,且操作终端能通过该地址访问 Home Assistant 首页,否则登录认证可能会失败。\r\n### 注意事项\r\n- 对于数百个及以上米家设备的用户,首次添加集成会耗费一些时间,请耐心等待。\r\n- 如果 Home Assistant 运行在docker环境下请确保docker网络模式为host否则会导致本地控制功能异常。\r\n- 集成本地控制功能存在一些依赖项请仔细阅读README。",
"description": "### 登录地区\r\n选择小米账号所在的地区。您可以在 `米家APP > 我的(位于底部菜单) > 更多设置 > 关于米家` 中查看。\r\n### 语言\r\n选择设备及实体名称所用的语言。缺少翻译的部分语句将使用英文显示。\r\n### OAuth2 认证跳转地址\r\nOAuth2 认证跳转地址为 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**Home Assistant 需要与当前操作终端(例如,个人电脑)在同一局域网内,且操作终端能通过该地址访问 Home Assistant 首页,否则登录认证可能会失败。\r\n### 网络检测地址\r\n用于检测网络是否正常未设置时将使用系统默认地址检测。如果默认地址检测异常时可尝试输入可用的自定义地址检测。\r\n- 可输入多个检测地址,地址之间使用`,`号间隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果为IP地址将采用ping方式检测如果为http(s)地址,将采用 HTTP GET 访问该地址检测。\r\n- **该配置为全局配置,修改会影响其它集成实例的网络检测,请谨慎修改。**\r\n### 注意事项\r\n- 对于数百个及以上米家设备的用户,首次添加集成会耗费一些时间,请耐心等待。\r\n- 如果 Home Assistant 运行在docker环境下请确保docker网络模式为host否则会导致本地控制功能异常。\r\n- 集成本地控制功能存在一些依赖项请仔细阅读README。",
"data": {
"cloud_server": "登录地区",
"integration_language": "语言",
"oauth_redirect_url": "认证跳转地址"
"oauth_redirect_url": "认证跳转地址",
"network_detect_addr": "网络检测地址"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "未选择家庭。",
"no_devices": "选择的家庭中没有设备。请选择有设备的家庭,然后继续。",
"no_filter_devices": "筛选设备为空。请选择有效的筛选条件,然后继续。",
"no_central_device": "【中枢网关模式】需要 Home Assistant 所在的局域网中存在可用的小米中枢网关。请检查选择的家庭是否符合该要求。"
"no_central_device": "【中枢网关模式】需要 Home Assistant 所在的局域网中存在可用的小米中枢网关。请检查选择的家庭是否符合该要求。",
"invalid_network_addr": "存在无效的IP地址或者HTTP地址请输入有效的地址。",
"invalid_ip_addr": "存在无法访问的IP地址请输入有效的IP地址。",
"invalid_http_addr": "存在无法访问的HTTP地址请输入有效的HTTP地址。",
"invalid_default_addr": "默认网络检测地址无法访问,请检查网络配置或者使用自定义网络检测地址。"
},
"abort": {
"network_connect_error": "配置失败。网络连接异常,请检查设备网络配置。",
@ -103,7 +108,8 @@
"hide_non_standard_entities": "隐藏非标准生成实体",
"display_devices_changed_notify": "显示设备状态变化通知",
"update_trans_rules": "更新实体转换规则",
"update_lan_ctrl_config": "更新局域网控制配置"
"update_lan_ctrl_config": "更新局域网控制配置",
"network_detect_config": "网络检测配置"
}
},
"update_user_info": {
@ -152,6 +158,13 @@
"enable_subscribe": "启用局域网订阅"
}
},
"network_detect_config": {
"title": "网络检测配置",
"description": "## 使用介绍\r\n### 网络检测地址\r\n用于检测网络是否正常未设置时将使用系统默认地址检测。如果默认地址检测异常时可尝试输入可用的自定义地址检测。\r\n- 可输入多个检测地址,地址之间使用`,`号间隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果为IP地址将采用ping方式检测如果为http(s)地址,将采用 HTTP GET 访问该地址检测。\r\n- **该配置为全局配置,修改会影响其它集成实例的网络检测,请谨慎修改。**",
"data": {
"network_detect_addr": "网络检测地址"
}
},
"config_confirm": {
"title": "确认配置",
"description": "**{nick_name}** 您好!请确认最新的配置信息,然后点击“提交”。\r\n集成将会使用更新后的配置重新载入。\r\n\r\n集成语言\t{lang_new}\r\n用户昵称\t{nick_name_new}\r\nAction 调试模式:\t{action_debug}\r\n隐藏非标准生成实体\t{hide_non_standard_entities}\r\n显示设备状态变化通知\t{display_devices_changed_notify}\r\n设备变化\t新增 **{devices_add}** 个设备,移除 **{devices_remove}** 个设备\r\n转换规则变化\t共条 **{trans_rules_count}** 规则,更新 **{trans_rules_count_success}** 条规则",
@ -174,7 +187,11 @@
"no_central_device": "【中枢网关模式】需要 Home Assistant 所在的局域网中存在可用的小米中枢网关。请检查选择的家庭是否符合该要求。",
"mdns_discovery_error": "本地设备发现服务异常。",
"update_config_error": "配置信息更新失败。",
"not_confirm": "未确认修改项。请勾选确认后再提交。"
"not_confirm": "未确认修改项。请勾选确认后再提交。",
"invalid_network_addr": "存在无效的IP地址或者HTTP地址请输入有效的地址。",
"invalid_ip_addr": "存在无法访问的IP地址请输入有效的IP地址。",
"invalid_http_addr": "存在无法访问的HTTP地址请输入有效的HTTP地址。",
"invalid_default_addr": "默认网络检测地址无法访问,请检查网络配置或者使用自定义网络检测地址。"
},
"abort": {
"network_connect_error": "配置失败。网络连接异常,请检查设备网络配置。",

View File

@ -11,11 +11,12 @@
},
"auth_config": {
"title": "基礎配置",
"description": "### 登錄地區\r\n選擇小米帳號所在的地區。您可以在 `米家APP > 我的(位於底部菜單) > 更多設置 > 關於米家` 中查看。\r\n### 語言\r\n選擇設備及實體名稱所用的語言。缺少翻譯的部分語句將使用英文顯示。\r\n### OAuth2 認證跳轉地址\r\nOAuth2 認證跳轉地址為 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**Home Assistant 需要與當前操作終端(例如,個人電腦)在同一局域網內,且操作終端能通過該地址訪問 Home Assistant 首頁,否則登錄認證可能會失敗。\r\n### 注意事項\r\n- 對於數百個及以上米家設備的用戶,首次添加集成會耗費一些時間,請耐心等待。\r\n- 如果 Home Assistant 運行在docker環境下請確保docker網絡模式為host否則會導致本地控制功能異常。\r\n- 集成本地控制功能存在一些依賴項請仔細閱讀README。",
"description": "### 登錄地區\r\n選擇小米帳號所在的地區。您可以在 `米家APP > 我的(位於底部菜單) > 更多設置 > 關於米家` 中查看。\r\n### 語言\r\n選擇設備及實體名稱所用的語言。缺少翻譯的部分語句將使用英文顯示。\r\n### OAuth2 認證跳轉地址\r\nOAuth2 認證跳轉地址為 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**Home Assistant 需要與當前操作終端(例如,個人電腦)在同一局域網內,且操作終端能通過該地址訪問 Home Assistant 首頁,否則登錄認證可能會失敗。\r\n### 網絡檢測地址\r\n用於檢測網絡是否正常未設置時將使用系統默認地址檢測。如果默認地址檢測異常時可嘗試輸入可用的自定義地址檢測。\r\n- 可輸入多個檢測地址,地址之間使用`,`號間隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果為IP地址將採用ping方式檢測如果為http(s)地址,將採用 HTTP GET 訪問該地址檢測。\r\n- **該配置為全局配置,修改會影響其它集成實例的網絡檢測,請謹慎修改。**\r\n### 注意事項\r\n- 對於數百個及以上米家設備的用戶,首次添加集成會耗費一些時間,請耐心等待。\r\n- 如果 Home Assistant 運行在docker環境下請確保docker網絡模式為host否則會導致本地控制功能異常。\r\n- 集成本地控制功能存在一些依賴項請仔細閱讀README。",
"data": {
"cloud_server": "登錄地區",
"integration_language": "語言",
"oauth_redirect_url": "認證跳轉地址"
"oauth_redirect_url": "認證跳轉地址",
"network_detect_addr": "網絡檢測地址"
}
},
"oauth_error": {
@ -70,7 +71,11 @@
"no_family_selected": "未選擇家庭。",
"no_devices": "選擇的家庭中沒有設備。請選擇有設備的家庭,然後繼續。",
"no_filter_devices": "篩選設備為空。請選擇有效的篩選條件,然後繼續。",
"no_central_device": "【中樞網關模式】需要 Home Assistant 所在的局域網中存在可用的小米中樞網關。請檢查選擇的家庭是否符合該要求。"
"no_central_device": "【中樞網關模式】需要 Home Assistant 所在的局域網中存在可用的小米中樞網關。請檢查選擇的家庭是否符合該要求。",
"invalid_network_addr": "存在無效的IP地址或者HTTP地址請輸入有效的地址。",
"invalid_ip_addr": "存在無法訪問的IP地址請輸入有效的IP地址。",
"invalid_http_addr": "存在無法訪問的HTTP地址請輸入有效的HTTP地址。",
"invalid_default_addr": "默認網絡檢測地址無法訪問,請檢查網絡配置或者使用自定義網絡檢測地址。"
},
"abort": {
"network_connect_error": "配置失敗。網絡連接異常,請檢查設備網絡配置。",
@ -152,6 +157,13 @@
"enable_subscribe": "啟用局域網訂閱"
}
},
"network_detect_config": {
"title": "網絡檢測配置",
"description": "## 使用介紹\r\n### 網絡檢測地址\r\n用於檢測網絡是否正常未設置時將使用系統默認地址檢測。如果默認地址檢測異常時可嘗試輸入可用的自定義地址檢測。\r\n- 可輸入多個檢測地址,地址之間使用`,`號間隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果為IP地址將採用ping方式檢測如果為http(s)地址,將採用 HTTP GET 訪問該地址檢測。\r\n- **該配置為全局配置,修改會影響其它集成實例的網絡檢測,請謹慎修改。**",
"data": {
"network_detect_addr": "網絡檢測地址"
}
},
"config_confirm": {
"title": "確認配置",
"description": "**{nick_name}** 您好!請確認最新的配置信息,然後點擊“提交”。\r\n集成將會使用更新後的配置重新載入。\r\n\r\n集成語言\t{lang_new}\r\n用戶暱稱\t{nick_name_new}\r\nAction 調試模式:\t{action_debug}\r\n隱藏非標準生成實體\t{hide_non_standard_entities}\r\n顯示設備狀態變化通知\t{display_devices_changed_notify}\r\n設備變化\t新增 **{devices_add}** 個設備,移除 **{devices_remove}** 個設備\r\n轉換規則變化\t共條 **{trans_rules_count}** 規則,更新 **{trans_rules_count_success}** 條規則",
@ -174,7 +186,11 @@
"no_central_device": "【中樞網關模式】需要 Home Assistant 所在的局域網中存在可用的小米中樞網關。請檢查選擇的家庭是否符合該要求。",
"mdns_discovery_error": "本地設備發現服務異常。",
"update_config_error": "配置信息更新失敗。",
"not_confirm": "未確認修改項。請勾選確認後再提交。"
"not_confirm": "未確認修改項。請勾選確認後再提交。",
"invalid_network_addr": "存在無效的IP地址或者HTTP地址請輸入有效的地址。",
"invalid_ip_addr": "存在無法訪問的IP地址請輸入有效的IP地址。",
"invalid_http_addr": "存在無法訪問的HTTP地址請輸入有效的HTTP地址。",
"invalid_default_addr": "默認網絡檢測地址無法訪問,請檢查網絡配置或者使用自定義網絡檢測地址。"
},
"abort": {
"network_connect_error": "配置失敗。網絡連接異常,請檢查設備網絡配置。",