mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-10-28 00:20:49 +08:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75b3acb632 | ||
|
|
2056fef04d | ||
|
|
7201cf2277 | ||
|
|
a253918896 | ||
|
|
bf38d93068 | ||
|
|
cf2a4bf649 | ||
|
|
8a59021445 | ||
|
|
89352d372a | ||
|
|
6653f0d8b0 | ||
|
|
02ff2cd83c | ||
|
|
cd450162e4 | ||
|
|
dd341eeb24 | ||
|
|
48b0248892 | ||
|
|
77c4c09823 | ||
|
|
e22c900de1 | ||
|
|
1a5f890cbe | ||
|
|
f290ff17d8 | ||
|
|
d4f31e8270 | ||
|
|
001af5384a | ||
|
|
c8d48625e9 | ||
|
|
d4ac7a935e | ||
|
|
ae047758de | ||
|
|
b40d357230 | ||
|
|
f4d591b4d3 |
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
release-zip:
|
release-zip:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: ZIP Component Dir
|
- name: ZIP Component Dir
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
9
.github/workflows/validate.yaml
vendored
9
.github/workflows/validate.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Hassfest validation
|
- name: Hassfest validation
|
||||||
uses: home-assistant/actions/hassfest@master
|
uses: home-assistant/actions/hassfest@master
|
||||||
@@ -23,18 +23,19 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: HACS validation
|
- name: HACS validation
|
||||||
uses: hacs/action@main
|
uses: hacs/action@main
|
||||||
with:
|
with:
|
||||||
category: integration
|
category: integration
|
||||||
|
ignore: license
|
||||||
|
|
||||||
validate-lint:
|
validate-lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -49,7 +50,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install the integration
|
- name: Install the integration
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -1,4 +1,36 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
## v0.5.0
|
||||||
|
### Added
|
||||||
|
- Add co2-density property mapping to SPEC_PROP_TRANS_MAP to enable statistics recording for CO2 sensors. [#1631](https://github.com/XiaoMi/ha_xiaomi_home/pull/1631)
|
||||||
|
- Migrate the unique_id of the service entities. [#1778](https://github.com/XiaoMi/ha_xiaomi_home/pull/1778)
|
||||||
|
- Add English and Swedish translations for viomi.vacuum.v18. [#1747](https://github.com/XiaoMi/ha_xiaomi_home/pull/1747)
|
||||||
|
- Add a User-Agent header to all cloud HTTP requests. [#1804](https://github.com/XiaoMi/ha_xiaomi_home/pull/1804)
|
||||||
|
### Changed
|
||||||
|
- Use a valid entity_id with the platform domain. [#1777](https://github.com/XiaoMi/ha_xiaomi_home/pull/1777)
|
||||||
|
- Map the humidifier mode name to the built-in mode. [1658](https://github.com/XiaoMi/ha_xiaomi_home/pull/1658)
|
||||||
|
- Ignore license in the validate-hacs action and use action/checkout@v5 instead of v4. [#1802](https://github.com/XiaoMi/ha_xiaomi_home/pull/1802)
|
||||||
|
- Replace deprecated CONCENTRATION_* unit constants. [#1801](https://github.com/XiaoMi/ha_xiaomi_home/pull/1801)
|
||||||
|
### Fixed
|
||||||
|
- Verify mijia cloud mqtt broker hostname during tls establishment. [#1774](https://github.com/XiaoMi/ha_xiaomi_home/pull/1774)
|
||||||
|
- Calculate the property value for the right value step. [#1623](https://github.com/XiaoMi/ha_xiaomi_home/pull/1623)
|
||||||
|
- Replace hardcoded URLs with description placeholders in all 13 translation files to comply with hassfest TRANSLATIONS rules. Add corresponding placeholder values in config_flow.py for both ConfigFlow and OptionsFlow form methods. [#1800](https://github.com/XiaoMi/ha_xiaomi_home/pull/1800)
|
||||||
|
- Drop non-UTF-8 cloud mips message instead of crashing mqtt loop. [#1750](https://github.com/XiaoMi/ha_xiaomi_home/pull/1750)
|
||||||
|
- Drain stale futures in __get_prop_handler on batch failure. [#1723](https://github.com/XiaoMi/ha_xiaomi_home/pull/1723)
|
||||||
|
- Return None instead of raising when getDevList times out. [#1793](https://github.com/XiaoMi/ha_xiaomi_home/pull/1793)
|
||||||
|
- Fix the MIoT-Spec-V2 of aupu.bhf_light.qa3s fan-level value-list, hey.relay.h100 power-consumption and electric-current, xiaomi.bhf_light.na2 fan-level, rw02.fan.rw001 fan-level, cykj.hood.jyj22 fan-level, daikin.aircondition.k5 mode and fan-level, xiaomi.aircondition.m4 humidity-range unit. [#1805](https://github.com/XiaoMi/ha_xiaomi_home/pull/1805)
|
||||||
|
|
||||||
|
## v0.4.7
|
||||||
|
### Added
|
||||||
|
- Add turkish language in multi_lang.json. [#1593](https://github.com/XiaoMi/ha_xiaomi_home/pull/1593)
|
||||||
|
### Changed
|
||||||
|
- Remove unused info getting from central hub gateway. [#1574](https://github.com/XiaoMi/ha_xiaomi_home/pull/1574)
|
||||||
|
- Remove xiaomi.router.rd03 from `UNSUPPORTED_MODELS` and add era.airp.cwb03, k0918.toothbrush.t700 into it. [#1567](https://github.com/XiaoMi/ha_xiaomi_home/pull/1567)
|
||||||
|
### Fixed
|
||||||
|
- Update the BLE mesh device online state from the central hub gateway. Partially fix the BLE mesh device online state. [#1579](https://github.com/XiaoMi/ha_xiaomi_home/pull/1579)
|
||||||
|
- Add unit for xiaomi.toothbrush.p001 brush-head-left-level property. [#1588](https://github.com/XiaoMi/ha_xiaomi_home/pull/1588)
|
||||||
|
- Fix the playing-state property's access field of xiaomi.wifispeaker.lx04, xiaomi.wifispeaker.lx06, xiaomi.wifispeaker.x08c and xiaomi.wifispeaker.l04m. [#1567](https://github.com/XiaoMi/ha_xiaomi_home/pull/1567)
|
||||||
|
- Fix the MIoT-Spec-V2 of xiaomi.airc.h09h00 humidity-range unit. [#1567](https://github.com/XiaoMi/ha_xiaomi_home/pull/1567)
|
||||||
|
|
||||||
## v0.4.6
|
## v0.4.6
|
||||||
### Added
|
### Added
|
||||||
- Add tv-box device as the media player entity. [#1562](https://github.com/XiaoMi/ha_xiaomi_home/pull/1562)
|
- Add tv-box device as the media player entity. [#1562](https://github.com/XiaoMi/ha_xiaomi_home/pull/1562)
|
||||||
@@ -12,7 +44,7 @@
|
|||||||
- Catch paho-mqtt subscribe error properly. [#1551](https://github.com/XiaoMi/ha_xiaomi_home/pull/1551)
|
- Catch paho-mqtt subscribe error properly. [#1551](https://github.com/XiaoMi/ha_xiaomi_home/pull/1551)
|
||||||
- After the network resumes, keep retrying to fetch the device list until it succeeds. [#1555](https://github.com/XiaoMi/ha_xiaomi_home/pull/1555)
|
- After the network resumes, keep retrying to fetch the device list until it succeeds. [#1555](https://github.com/XiaoMi/ha_xiaomi_home/pull/1555)
|
||||||
- Catch the http post error properly. [#1555](https://github.com/XiaoMi/ha_xiaomi_home/pull/1555)
|
- Catch the http post error properly. [#1555](https://github.com/XiaoMi/ha_xiaomi_home/pull/1555)
|
||||||
- Fixed the format and the access field of daikin.aircondition.k2 and fix: daikin.airfresh.k33 string value properties. [#1561](https://github.com/XiaoMi/ha_xiaomi_home/pull/1561)
|
- Fix the format and the access field of daikin.aircondition.k2 and daikin.airfresh.k33 string value properties. [#1561](https://github.com/XiaoMi/ha_xiaomi_home/pull/1561)
|
||||||
|
|
||||||
## v0.4.5
|
## v0.4.5
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ from typing import Optional
|
|||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.components import persistent_notification
|
from homeassistant.components import persistent_notification
|
||||||
from homeassistant.helpers import device_registry, entity_registry
|
from homeassistant.helpers import config_validation as cv, device_registry, entity_registry
|
||||||
|
|
||||||
from .miot.common import slugify_did
|
from .miot.common import slugify_did
|
||||||
from .miot.miot_storage import (
|
from .miot.miot_storage import (
|
||||||
@@ -67,6 +67,8 @@ from .miot.miot_client import MIoTClient, get_miot_instance_async
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, hass_config: dict) -> bool:
|
async def async_setup(hass: HomeAssistant, hass_config: dict) -> bool:
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
@@ -82,6 +84,52 @@ async def async_setup(hass: HomeAssistant, hass_config: dict) -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def migrate_service_unique_id(
|
||||||
|
er: entity_registry.EntityRegistry,
|
||||||
|
er_entries: dict[str, entity_registry.RegistryEntry],
|
||||||
|
device: MIoTDevice, spec: MIoTSpecService
|
||||||
|
) -> bool:
|
||||||
|
"""Migrate the unique_id of a service entity registered by a previous
|
||||||
|
version of the integration.
|
||||||
|
|
||||||
|
Only the unique_id is rewritten, the entity_id is left untouched so that
|
||||||
|
the automations, scripts and dashboards referring to it keep working.
|
||||||
|
|
||||||
|
Return False when a legacy entity was found but could not be migrated.
|
||||||
|
"""
|
||||||
|
unique_id = device.gen_service_entity_id(
|
||||||
|
ha_domain=DOMAIN, siid=spec.iid, description=spec.description)
|
||||||
|
if unique_id in er_entries:
|
||||||
|
# Already up to date. A legacy entity left over from the format change
|
||||||
|
# may still be registered, it is not removed here since that would
|
||||||
|
# also drop the name, area and aliases set by the user.
|
||||||
|
return True
|
||||||
|
legacy_unique_id: Optional[str] = next(
|
||||||
|
(legacy_unique_id
|
||||||
|
for legacy_unique_id in device.gen_service_entity_id_legacy(
|
||||||
|
ha_domain=DOMAIN, siid=spec.iid)
|
||||||
|
if legacy_unique_id in er_entries),
|
||||||
|
None)
|
||||||
|
if not legacy_unique_id:
|
||||||
|
# A newly added entity
|
||||||
|
return True
|
||||||
|
entity_id = er_entries[legacy_unique_id].entity_id
|
||||||
|
try:
|
||||||
|
er.async_update_entity(entity_id, new_unique_id=unique_id)
|
||||||
|
except ValueError as error:
|
||||||
|
# The unique_id is registered by another config entry, which happens
|
||||||
|
# when the same device is shared between two Xiaomi accounts
|
||||||
|
_LOGGER.warning(
|
||||||
|
'migrate unique_id failed, %s, %s, %s',
|
||||||
|
error, entity_id, unique_id)
|
||||||
|
return False
|
||||||
|
er_entries[unique_id] = er_entries.pop(legacy_unique_id)
|
||||||
|
_LOGGER.info(
|
||||||
|
'migrate unique_id, %s, %s -> %s',
|
||||||
|
entity_id, legacy_unique_id, unique_id)
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant, config_entry: ConfigEntry
|
hass: HomeAssistant, config_entry: ConfigEntry
|
||||||
) -> bool:
|
) -> bool:
|
||||||
@@ -125,6 +173,13 @@ async def async_setup_entry(
|
|||||||
await manufacturer.init_async()
|
await manufacturer.init_async()
|
||||||
miot_devices: list[MIoTDevice] = []
|
miot_devices: list[MIoTDevice] = []
|
||||||
er = entity_registry.async_get(hass=hass)
|
er = entity_registry.async_get(hass=hass)
|
||||||
|
# Index the registered entities by unique_id, used to migrate the
|
||||||
|
# entities registered by a previous version of the integration
|
||||||
|
er_entries: dict[str, entity_registry.RegistryEntry] = {
|
||||||
|
entry.unique_id: entry
|
||||||
|
for entry in entity_registry.async_entries_for_config_entry(
|
||||||
|
registry=er, config_entry_id=entry_id)}
|
||||||
|
migrate_failed: int = 0
|
||||||
for did, info in miot_client.device_list.items():
|
for did, info in miot_client.device_list.items():
|
||||||
spec_instance = await spec_parser.parse(urn=info['urn'])
|
spec_instance = await spec_parser.parse(urn=info['urn'])
|
||||||
if not isinstance(spec_instance, MIoTSpecInstance):
|
if not isinstance(spec_instance, MIoTSpecInstance):
|
||||||
@@ -138,6 +193,16 @@ async def async_setup_entry(
|
|||||||
spec_instance=spec_instance)
|
spec_instance=spec_instance)
|
||||||
miot_devices.append(device)
|
miot_devices.append(device)
|
||||||
device.spec_transform()
|
device.spec_transform()
|
||||||
|
# Migrate the unique_id of the entities registered by a previous
|
||||||
|
# version of the integration
|
||||||
|
for entities in device.entity_list.values():
|
||||||
|
for entity in entities:
|
||||||
|
if not isinstance(entity.spec, MIoTSpecService):
|
||||||
|
continue
|
||||||
|
if not migrate_service_unique_id(
|
||||||
|
er=er, er_entries=er_entries, device=device,
|
||||||
|
spec=entity.spec):
|
||||||
|
migrate_failed += 1
|
||||||
# Remove filter entities and non-standard entities
|
# Remove filter entities and non-standard entities
|
||||||
for platform in SUPPORTED_PLATFORMS:
|
for platform in SUPPORTED_PLATFORMS:
|
||||||
# ONLY support filter spec service translate entity
|
# ONLY support filter spec service translate entity
|
||||||
@@ -234,6 +299,12 @@ async def async_setup_entry(
|
|||||||
if er.async_get(entity_id_or_uuid=entity_id):
|
if er.async_get(entity_id_or_uuid=entity_id):
|
||||||
er.async_remove(entity_id=entity_id)
|
er.async_remove(entity_id=entity_id)
|
||||||
|
|
||||||
|
if migrate_failed:
|
||||||
|
_LOGGER.warning(
|
||||||
|
'unique_id migration skipped, %s entities may show up as new '
|
||||||
|
'entities while the old ones become unavailable',
|
||||||
|
migrate_failed)
|
||||||
|
|
||||||
hass.data[DOMAIN]['devices'][config_entry.entry_id] = miot_devices
|
hass.data[DOMAIN]['devices'][config_entry.entry_id] = miot_devices
|
||||||
await hass.config_entries.async_forward_entry_setups(
|
await hass.config_entries.async_forward_entry_setups(
|
||||||
config_entry, SUPPORTED_PLATFORMS)
|
config_entry, SUPPORTED_PLATFORMS)
|
||||||
|
|||||||
BIN
custom_components/xiaomi_home/brand/icon.png
Normal file
BIN
custom_components/xiaomi_home/brand/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -92,6 +92,7 @@ from .miot.const import (
|
|||||||
MIHOME_CERT_EXPIRE_MARGIN
|
MIHOME_CERT_EXPIRE_MARGIN
|
||||||
)
|
)
|
||||||
from .miot.miot_cloud import MIoTHttpClient, MIoTOauthClient
|
from .miot.miot_cloud import MIoTHttpClient, MIoTOauthClient
|
||||||
|
from .miot.common import get_system_info_str
|
||||||
from .miot.miot_storage import MIoTStorage, MIoTCert
|
from .miot.miot_storage import MIoTStorage, MIoTCert
|
||||||
from .miot.miot_mdns import MipsService
|
from .miot.miot_mdns import MipsService
|
||||||
from .miot.web_pages import oauth_redirect_page
|
from .miot.web_pages import oauth_redirect_page
|
||||||
@@ -175,6 +176,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
self._oauth_redirect_url_full = ''
|
self._oauth_redirect_url_full = ''
|
||||||
self._miot_oauth = None
|
self._miot_oauth = None
|
||||||
self._miot_http = None
|
self._miot_http = None
|
||||||
|
self._system_info = ''
|
||||||
|
|
||||||
self._cc_home_info = {}
|
self._cc_home_info = {}
|
||||||
self._cc_home_list_show = {}
|
self._cc_home_list_show = {}
|
||||||
@@ -308,6 +310,9 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
): bool,
|
): bool,
|
||||||
}),
|
}),
|
||||||
errors={'base': reason},
|
errors={'base': reason},
|
||||||
|
description_placeholders={
|
||||||
|
'oauth_redirect_url': OAUTH_REDIRECT_URL,
|
||||||
|
},
|
||||||
last_step=False,
|
last_step=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -417,7 +422,12 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
'http_host': (
|
'http_host': (
|
||||||
DEFAULT_OAUTH2_API_HOST
|
DEFAULT_OAUTH2_API_HOST
|
||||||
if self._cloud_server == DEFAULT_CLOUD_SERVER
|
if self._cloud_server == DEFAULT_CLOUD_SERVER
|
||||||
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}')},
|
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}'),
|
||||||
|
'bing_url': 'https://www.bing.com',
|
||||||
|
'oauth2_auth_url': OAUTH2_AUTH_URL,
|
||||||
|
'spec_api_url':
|
||||||
|
'https://miot-spec.org/miot-spec-v2/template/list/device',
|
||||||
|
},
|
||||||
last_step=False
|
last_step=False
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -430,11 +440,13 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
'async_step_oauth, redirect_url: %s',
|
'async_step_oauth, redirect_url: %s',
|
||||||
self._oauth_redirect_url_full)
|
self._oauth_redirect_url_full)
|
||||||
|
self._system_info = await get_system_info_str(self.hass)
|
||||||
miot_oauth = MIoTOauthClient(
|
miot_oauth = MIoTOauthClient(
|
||||||
client_id=OAUTH2_CLIENT_ID,
|
client_id=OAUTH2_CLIENT_ID,
|
||||||
redirect_url=self._oauth_redirect_url_full,
|
redirect_url=self._oauth_redirect_url_full,
|
||||||
cloud_server=self._cloud_server,
|
cloud_server=self._cloud_server,
|
||||||
uuid=self._uuid,
|
uuid=self._uuid,
|
||||||
|
system_info=self._system_info,
|
||||||
loop=self._main_loop)
|
loop=self._main_loop)
|
||||||
self._cc_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)
|
redirect_url=self._oauth_redirect_url_full)
|
||||||
@@ -512,7 +524,9 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
self._miot_http = MIoTHttpClient(
|
self._miot_http = MIoTHttpClient(
|
||||||
cloud_server=self._cloud_server,
|
cloud_server=self._cloud_server,
|
||||||
client_id=OAUTH2_CLIENT_ID,
|
client_id=OAUTH2_CLIENT_ID,
|
||||||
access_token=auth_info['access_token'])
|
access_token=auth_info['access_token'],
|
||||||
|
uuid=self._uuid,
|
||||||
|
system_info=self._system_info)
|
||||||
else:
|
else:
|
||||||
self._miot_http.update_http_header(
|
self._miot_http.update_http_header(
|
||||||
cloud_server=self._cloud_server,
|
cloud_server=self._cloud_server,
|
||||||
@@ -1183,6 +1197,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||||||
}),
|
}),
|
||||||
description_placeholders={
|
description_placeholders={
|
||||||
'cloud_server': CLOUD_SERVERS[self._cloud_server],
|
'cloud_server': CLOUD_SERVERS[self._cloud_server],
|
||||||
|
'oauth_redirect_url': OAUTH_REDIRECT_URL,
|
||||||
},
|
},
|
||||||
last_step=False,
|
last_step=False,
|
||||||
)
|
)
|
||||||
@@ -1266,10 +1281,13 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||||||
'get_access_token, %s, %s', err, traceback.format_exc())
|
'get_access_token, %s, %s', err, traceback.format_exc())
|
||||||
raise MIoTConfigError('get_token_error') from err
|
raise MIoTConfigError('get_token_error') from err
|
||||||
# Check uid
|
# Check uid
|
||||||
|
system_info = await get_system_info_str(self.hass)
|
||||||
m_http: MIoTHttpClient = MIoTHttpClient(
|
m_http: MIoTHttpClient = MIoTHttpClient(
|
||||||
cloud_server=self._cloud_server,
|
cloud_server=self._cloud_server,
|
||||||
client_id=OAUTH2_CLIENT_ID,
|
client_id=OAUTH2_CLIENT_ID,
|
||||||
access_token=auth_info['access_token'],
|
access_token=auth_info['access_token'],
|
||||||
|
uuid=self._entry_data['uuid'],
|
||||||
|
system_info=system_info,
|
||||||
loop=self._main_loop)
|
loop=self._main_loop)
|
||||||
if await m_http.get_uid_async() != self._uid:
|
if await m_http.get_uid_async() != self._uid:
|
||||||
raise AbortFlow('inconsistent_account')
|
raise AbortFlow('inconsistent_account')
|
||||||
@@ -1926,7 +1944,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||||||
'http_host': (
|
'http_host': (
|
||||||
DEFAULT_OAUTH2_API_HOST
|
DEFAULT_OAUTH2_API_HOST
|
||||||
if self._cloud_server == DEFAULT_CLOUD_SERVER
|
if self._cloud_server == DEFAULT_CLOUD_SERVER
|
||||||
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}')},
|
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}'),
|
||||||
|
'bing_url': 'https://www.bing.com',
|
||||||
|
'oauth2_auth_url': OAUTH2_AUTH_URL,
|
||||||
|
'spec_api_url':
|
||||||
|
'https://miot-spec.org/miot-spec-v2/template/list/device',
|
||||||
|
},
|
||||||
last_step=False
|
last_step=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ from homeassistant.components.humidifier import (HumidifierEntity,
|
|||||||
HumidifierDeviceClass,
|
HumidifierDeviceClass,
|
||||||
HumidifierEntityFeature,
|
HumidifierEntityFeature,
|
||||||
HumidifierAction)
|
HumidifierAction)
|
||||||
|
from homeassistant.components.humidifier.const import (
|
||||||
|
MODE_NORMAL, MODE_ECO, MODE_BOOST, MODE_COMFORT, MODE_SLEEP, MODE_AUTO)
|
||||||
|
|
||||||
from .miot.miot_spec import MIoTSpecProperty
|
from .miot.miot_spec import MIoTSpecProperty
|
||||||
from .miot.miot_device import MIoTDevice, MIoTEntityData, MIoTServiceEntity
|
from .miot.miot_device import MIoTDevice, MIoTEntityData, MIoTServiceEntity
|
||||||
@@ -130,7 +132,24 @@ class Humidifier(MIoTServiceEntity, HumidifierEntity):
|
|||||||
if not prop.value_list:
|
if not prop.value_list:
|
||||||
_LOGGER.error('mode value_list is None, %s', self.entity_id)
|
_LOGGER.error('mode value_list is None, %s', self.entity_id)
|
||||||
continue
|
continue
|
||||||
self._mode_map = prop.value_list.to_map()
|
self._mode_map = {}
|
||||||
|
for item in prop.value_list.items:
|
||||||
|
if item.name in {'none', 'the_standard_model',
|
||||||
|
'constant_speed', '标准'}:
|
||||||
|
self._mode_map[item.value] = MODE_NORMAL
|
||||||
|
elif item.name in {'低湿'}:
|
||||||
|
self._mode_map[item.value] = MODE_ECO
|
||||||
|
elif item.name in {'strong', '高湿'}:
|
||||||
|
self._mode_map[item.value] = MODE_BOOST
|
||||||
|
elif item.name in {'skin'}:
|
||||||
|
self._mode_map[item.value] = MODE_COMFORT
|
||||||
|
elif item.name in {'sleep', 'sleep_mode', '睡眠'}:
|
||||||
|
self._mode_map[item.value] = MODE_SLEEP
|
||||||
|
elif item.name in {'constant_humidity',
|
||||||
|
'const_humidity', '自动'}:
|
||||||
|
self._mode_map[item.value] = MODE_AUTO
|
||||||
|
else:
|
||||||
|
self._mode_map[item.value] = item.description
|
||||||
self._attr_available_modes = list(self._mode_map.values())
|
self._attr_available_modes = list(self._mode_map.values())
|
||||||
self._attr_supported_features |= HumidifierEntityFeature.MODES
|
self._attr_supported_features |= HumidifierEntityFeature.MODES
|
||||||
self._prop_mode = prop
|
self._prop_mode = prop
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"cryptography",
|
"cryptography",
|
||||||
"psutil"
|
"psutil"
|
||||||
],
|
],
|
||||||
"version": "v0.4.6",
|
"version": "v0.5.0",
|
||||||
"zeroconf": [
|
"zeroconf": [
|
||||||
"_miot-central._tcp.local."
|
"_miot-central._tcp.local."
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -186,3 +186,19 @@ class MIoTHttp:
|
|||||||
ev_loop = loop or asyncio.get_running_loop()
|
ev_loop = loop or asyncio.get_running_loop()
|
||||||
return await ev_loop.run_in_executor(
|
return await ev_loop.run_in_executor(
|
||||||
None, MIoTHttp.post, url, data, headers)
|
None, MIoTHttp.post, url, data, headers)
|
||||||
|
|
||||||
|
|
||||||
|
async def get_system_info_str(hass) -> str:
|
||||||
|
"""Get system info string for User-Agent."""
|
||||||
|
# pylint: disable=import-outside-toplevel
|
||||||
|
from homeassistant.helpers.system_info import async_get_system_info
|
||||||
|
info = await async_get_system_info(hass)
|
||||||
|
version = info['version']
|
||||||
|
os_name = info['os_name']
|
||||||
|
os_version = info['os_version']
|
||||||
|
arch = info['arch']
|
||||||
|
installation_type = info['installation_type']
|
||||||
|
return (
|
||||||
|
f'hass/{version} ({os_name}/{os_version};'
|
||||||
|
f' {arch}; {installation_type})'
|
||||||
|
)
|
||||||
|
|||||||
@@ -45,7 +45,14 @@ off Xiaomi or its affiliates' products.
|
|||||||
|
|
||||||
Constants.
|
Constants.
|
||||||
"""
|
"""
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
DOMAIN: str = 'xiaomi_home'
|
DOMAIN: str = 'xiaomi_home'
|
||||||
|
|
||||||
|
INTEGRATION_VERSION: str = json.loads(
|
||||||
|
(Path(__file__).parent.parent / 'manifest.json').read_text()
|
||||||
|
)['version']
|
||||||
DEFAULT_NAME: str = 'Xiaomi Home'
|
DEFAULT_NAME: str = 'Xiaomi Home'
|
||||||
|
|
||||||
DEFAULT_NICK_NAME: str = 'Xiaomi'
|
DEFAULT_NICK_NAME: str = 'Xiaomi'
|
||||||
@@ -90,8 +97,9 @@ SUPPORTED_PLATFORMS: list = [
|
|||||||
|
|
||||||
UNSUPPORTED_MODELS: list = [
|
UNSUPPORTED_MODELS: list = [
|
||||||
'chuangmi.ir.v2',
|
'chuangmi.ir.v2',
|
||||||
|
'era.airp.cwb03',
|
||||||
'hmpace.motion.v6nfc',
|
'hmpace.motion.v6nfc',
|
||||||
'xiaomi.router.rd03'
|
'k0918.toothbrush.t700'
|
||||||
]
|
]
|
||||||
|
|
||||||
DEFAULT_CLOUD_SERVER: str = 'cn'
|
DEFAULT_CLOUD_SERVER: str = 'cn'
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
from homeassistant.components import zeroconf
|
from homeassistant.components import zeroconf
|
||||||
|
|
||||||
# pylint: disable=relative-beyond-top-level
|
# pylint: disable=relative-beyond-top-level
|
||||||
from .common import MIoTMatcher, slugify_did
|
from .common import MIoTMatcher, get_system_info_str, slugify_did
|
||||||
from .const import (
|
from .const import (
|
||||||
DEFAULT_CTRL_MODE, DEFAULT_INTEGRATION_LANGUAGE, DEFAULT_NICK_NAME, DOMAIN,
|
DEFAULT_CTRL_MODE, DEFAULT_INTEGRATION_LANGUAGE, DEFAULT_NICK_NAME, DOMAIN,
|
||||||
MIHOME_CERT_EXPIRE_MARGIN, NETWORK_REFRESH_INTERVAL,
|
MIHOME_CERT_EXPIRE_MARGIN, NETWORK_REFRESH_INTERVAL,
|
||||||
@@ -189,6 +189,7 @@ class MIoTClient:
|
|||||||
storage: MIoTStorage,
|
storage: MIoTStorage,
|
||||||
mips_service: MipsService,
|
mips_service: MipsService,
|
||||||
miot_lan: MIoTLan,
|
miot_lan: MIoTLan,
|
||||||
|
system_info: str = '',
|
||||||
loop: Optional[asyncio.AbstractEventLoop] = None) -> None:
|
loop: Optional[asyncio.AbstractEventLoop] = None) -> None:
|
||||||
# MUST run in a running event loop
|
# MUST run in a running event loop
|
||||||
self._main_loop = loop or asyncio.get_running_loop()
|
self._main_loop = loop or asyncio.get_running_loop()
|
||||||
@@ -207,6 +208,7 @@ class MIoTClient:
|
|||||||
self._entry_data = entry_data
|
self._entry_data = entry_data
|
||||||
self._uid = entry_data['uid']
|
self._uid = entry_data['uid']
|
||||||
self._cloud_server = entry_data['cloud_server']
|
self._cloud_server = entry_data['cloud_server']
|
||||||
|
self._system_info = system_info
|
||||||
self._ctrl_mode = CtrlMode.load(
|
self._ctrl_mode = CtrlMode.load(
|
||||||
entry_data.get('ctrl_mode', DEFAULT_CTRL_MODE))
|
entry_data.get('ctrl_mode', DEFAULT_CTRL_MODE))
|
||||||
self._network = network
|
self._network = network
|
||||||
@@ -285,12 +287,15 @@ class MIoTClient:
|
|||||||
redirect_url=self._entry_data['oauth_redirect_url'],
|
redirect_url=self._entry_data['oauth_redirect_url'],
|
||||||
cloud_server=self._cloud_server,
|
cloud_server=self._cloud_server,
|
||||||
uuid=self._entry_data["uuid"],
|
uuid=self._entry_data["uuid"],
|
||||||
|
system_info=self._system_info,
|
||||||
loop=self._main_loop)
|
loop=self._main_loop)
|
||||||
# MIoT http client instance
|
# MIoT http client instance
|
||||||
self._http = MIoTHttpClient(
|
self._http = MIoTHttpClient(
|
||||||
cloud_server=self._cloud_server,
|
cloud_server=self._cloud_server,
|
||||||
client_id=OAUTH2_CLIENT_ID,
|
client_id=OAUTH2_CLIENT_ID,
|
||||||
access_token=self._user_config['auth_info']['access_token'],
|
access_token=self._user_config['auth_info']['access_token'],
|
||||||
|
uuid=self._entry_data['uuid'],
|
||||||
|
system_info=self._system_info,
|
||||||
loop=self._main_loop)
|
loop=self._main_loop)
|
||||||
# MIoT cert client
|
# MIoT cert client
|
||||||
self._cert = MIoTCert(
|
self._cert = MIoTCert(
|
||||||
@@ -1256,7 +1261,15 @@ class MIoTClient:
|
|||||||
) -> None:
|
) -> None:
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
'gateway devices list changed, %s, %s', mips.group_id, did_list)
|
'gateway devices list changed, %s, %s', mips.group_id, did_list)
|
||||||
payload: dict = {'filter': {'did': did_list}}
|
payload: dict = {
|
||||||
|
'filter': {
|
||||||
|
'did': did_list
|
||||||
|
},
|
||||||
|
'info': [
|
||||||
|
'name', 'model', 'urn',
|
||||||
|
'online', 'specV2Access', 'pushAvailable'
|
||||||
|
]
|
||||||
|
}
|
||||||
gw_list = await mips.get_dev_list_async(
|
gw_list = await mips.get_dev_list_async(
|
||||||
payload=json.dumps(payload))
|
payload=json.dumps(payload))
|
||||||
if gw_list is None:
|
if gw_list is None:
|
||||||
@@ -1519,6 +1532,8 @@ class MIoTClient:
|
|||||||
if did not in filter_dids:
|
if did not in filter_dids:
|
||||||
continue
|
continue
|
||||||
device_old = self._device_list_gateway.get(did, None)
|
device_old = self._device_list_gateway.get(did, None)
|
||||||
|
gw_state_old = device_old.get(
|
||||||
|
'online', False) if device_old else False
|
||||||
gw_state_new: bool = False
|
gw_state_new: bool = False
|
||||||
device_new = gw_list.pop(did, None)
|
device_new = gw_list.pop(did, None)
|
||||||
if device_new:
|
if device_new:
|
||||||
@@ -1532,7 +1547,7 @@ class MIoTClient:
|
|||||||
device_old['online'] = False
|
device_old['online'] = False
|
||||||
# Update cache group_id
|
# Update cache group_id
|
||||||
info['group_id'] = group_id
|
info['group_id'] = group_id
|
||||||
if not gw_state_new:
|
if (gw_state_old == gw_state_new) and (not gw_state_new):
|
||||||
continue
|
continue
|
||||||
self.__update_device_msg_sub(did=did)
|
self.__update_device_msg_sub(did=did)
|
||||||
state_old: Optional[bool] = info.get('online', None)
|
state_old: Optional[bool] = info.get('online', None)
|
||||||
@@ -1590,7 +1605,14 @@ class MIoTClient:
|
|||||||
if not mips.mips_state:
|
if not mips.mips_state:
|
||||||
_LOGGER.debug('local mips disconnect, skip refresh, %s', group_id)
|
_LOGGER.debug('local mips disconnect, skip refresh, %s', group_id)
|
||||||
return
|
return
|
||||||
gw_list: dict = await mips.get_dev_list_async()
|
payload: dict = {
|
||||||
|
'info': [
|
||||||
|
'name', 'model', 'urn',
|
||||||
|
'online', 'specV2Access', 'pushAvailable'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
gw_list: dict = await mips.get_dev_list_async(
|
||||||
|
payload=json.dumps(payload))
|
||||||
if gw_list is None:
|
if gw_list is None:
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
'refresh gw devices with group_id failed, %s, %s',
|
'refresh gw devices with group_id failed, %s, %s',
|
||||||
@@ -2024,6 +2046,7 @@ async def get_miot_instance_async(
|
|||||||
hass.data[DOMAIN]['miot_lan'] = miot_lan
|
hass.data[DOMAIN]['miot_lan'] = miot_lan
|
||||||
_LOGGER.info('create miot_lan instance')
|
_LOGGER.info('create miot_lan instance')
|
||||||
# MIoT client
|
# MIoT client
|
||||||
|
system_info = await get_system_info_str(hass)
|
||||||
miot_client = MIoTClient(
|
miot_client = MIoTClient(
|
||||||
entry_id=entry_id,
|
entry_id=entry_id,
|
||||||
entry_data=entry_data,
|
entry_data=entry_data,
|
||||||
@@ -2031,6 +2054,7 @@ async def get_miot_instance_async(
|
|||||||
storage=storage,
|
storage=storage,
|
||||||
mips_service=mips_service,
|
mips_service=mips_service,
|
||||||
miot_lan=miot_lan,
|
miot_lan=miot_lan,
|
||||||
|
system_info=system_info,
|
||||||
loop=loop
|
loop=loop
|
||||||
)
|
)
|
||||||
miot_client.persistent_notify = persistent_notify
|
miot_client.persistent_notify = persistent_notify
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ from .common import calc_group_id
|
|||||||
from .const import (
|
from .const import (
|
||||||
UNSUPPORTED_MODELS,
|
UNSUPPORTED_MODELS,
|
||||||
DEFAULT_OAUTH2_API_HOST,
|
DEFAULT_OAUTH2_API_HOST,
|
||||||
|
INTEGRATION_VERSION,
|
||||||
MIHOME_HTTP_API_TIMEOUT,
|
MIHOME_HTTP_API_TIMEOUT,
|
||||||
OAUTH2_AUTH_URL)
|
OAUTH2_AUTH_URL)
|
||||||
from .miot_error import MIoTErrorCode, MIoTHttpError, MIoTOauthError
|
from .miot_error import MIoTErrorCode, MIoTHttpError, MIoTOauthError
|
||||||
@@ -78,11 +79,13 @@ class MIoTOauthClient:
|
|||||||
_client_id: int
|
_client_id: int
|
||||||
_redirect_url: str
|
_redirect_url: str
|
||||||
_device_id: str
|
_device_id: str
|
||||||
|
_user_agent: str
|
||||||
_state: str
|
_state: str
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, client_id: str, redirect_url: str, cloud_server: str,
|
self, client_id: str, redirect_url: str, cloud_server: str,
|
||||||
uuid: str, loop: Optional[asyncio.AbstractEventLoop] = None
|
uuid: str, system_info: str = '',
|
||||||
|
loop: Optional[asyncio.AbstractEventLoop] = None
|
||||||
) -> None:
|
) -> None:
|
||||||
self._main_loop = loop or asyncio.get_running_loop()
|
self._main_loop = loop or asyncio.get_running_loop()
|
||||||
if client_id is None or client_id.strip() == '':
|
if client_id is None or client_id.strip() == '':
|
||||||
@@ -101,6 +104,10 @@ class MIoTOauthClient:
|
|||||||
else:
|
else:
|
||||||
self._oauth_host = f'{cloud_server}.{DEFAULT_OAUTH2_API_HOST}'
|
self._oauth_host = f'{cloud_server}.{DEFAULT_OAUTH2_API_HOST}'
|
||||||
self._device_id = f'ha.{uuid}'
|
self._device_id = f'ha.{uuid}'
|
||||||
|
self._user_agent = (
|
||||||
|
f'ha_xiaomi_home/{INTEGRATION_VERSION}'
|
||||||
|
f' {system_info}'
|
||||||
|
f' client/{self._device_id}')
|
||||||
self._state = hashlib.sha1(
|
self._state = hashlib.sha1(
|
||||||
f'd={self._device_id}'.encode('utf-8')).hexdigest()
|
f'd={self._device_id}'.encode('utf-8')).hexdigest()
|
||||||
self._session = aiohttp.ClientSession(loop=self._main_loop)
|
self._session = aiohttp.ClientSession(loop=self._main_loop)
|
||||||
@@ -161,7 +168,10 @@ class MIoTOauthClient:
|
|||||||
http_res = await self._session.get(
|
http_res = await self._session.get(
|
||||||
url=f'https://{self._oauth_host}/app/v2/ha/oauth/get_token',
|
url=f'https://{self._oauth_host}/app/v2/ha/oauth/get_token',
|
||||||
params={'data': json.dumps(data)},
|
params={'data': json.dumps(data)},
|
||||||
headers={'content-type': 'application/x-www-form-urlencoded'},
|
headers={
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'User-Agent': self._user_agent,
|
||||||
|
},
|
||||||
timeout=MIHOME_HTTP_API_TIMEOUT
|
timeout=MIHOME_HTTP_API_TIMEOUT
|
||||||
)
|
)
|
||||||
if http_res.status == 401:
|
if http_res.status == 401:
|
||||||
@@ -239,12 +249,14 @@ class MIoTHttpClient:
|
|||||||
_base_url: str
|
_base_url: str
|
||||||
_client_id: str
|
_client_id: str
|
||||||
_access_token: str
|
_access_token: str
|
||||||
|
_user_agent: str
|
||||||
|
|
||||||
_get_prop_timer: Optional[asyncio.TimerHandle]
|
_get_prop_timer: Optional[asyncio.TimerHandle]
|
||||||
_get_prop_list: dict[str, dict]
|
_get_prop_list: dict[str, dict]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, cloud_server: str, client_id: str, access_token: str,
|
self, cloud_server: str, client_id: str, access_token: str,
|
||||||
|
uuid: str, system_info: str = '',
|
||||||
loop: Optional[asyncio.AbstractEventLoop] = None
|
loop: Optional[asyncio.AbstractEventLoop] = None
|
||||||
) -> None:
|
) -> None:
|
||||||
self._main_loop = loop or asyncio.get_running_loop()
|
self._main_loop = loop or asyncio.get_running_loop()
|
||||||
@@ -260,9 +272,14 @@ class MIoTHttpClient:
|
|||||||
not isinstance(cloud_server, str)
|
not isinstance(cloud_server, str)
|
||||||
or not isinstance(client_id, str)
|
or not isinstance(client_id, str)
|
||||||
or not isinstance(access_token, str)
|
or not isinstance(access_token, str)
|
||||||
|
or not isinstance(uuid, str)
|
||||||
):
|
):
|
||||||
raise MIoTHttpError('invalid params')
|
raise MIoTHttpError('invalid params')
|
||||||
|
|
||||||
|
self._user_agent = (
|
||||||
|
f'ha_xiaomi_home/{INTEGRATION_VERSION}'
|
||||||
|
f' {system_info}'
|
||||||
|
f' client/ha.{uuid}')
|
||||||
self.update_http_header(
|
self.update_http_header(
|
||||||
cloud_server=cloud_server, client_id=client_id,
|
cloud_server=cloud_server, client_id=client_id,
|
||||||
access_token=access_token)
|
access_token=access_token)
|
||||||
@@ -303,6 +320,7 @@ class MIoTHttpClient:
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Authorization': f'Bearer{self._access_token}',
|
'Authorization': f'Bearer{self._access_token}',
|
||||||
'X-Client-AppId': self._client_id,
|
'X-Client-AppId': self._client_id,
|
||||||
|
'User-Agent': self._user_agent,
|
||||||
}
|
}
|
||||||
|
|
||||||
# pylint: disable=unused-private-member
|
# pylint: disable=unused-private-member
|
||||||
@@ -367,7 +385,10 @@ class MIoTHttpClient:
|
|||||||
url='https://open.account.xiaomi.com/user/profile',
|
url='https://open.account.xiaomi.com/user/profile',
|
||||||
params={
|
params={
|
||||||
'clientId': self._client_id, 'token': self._access_token},
|
'clientId': self._client_id, 'token': self._access_token},
|
||||||
headers={'content-type': 'application/x-www-form-urlencoded'},
|
headers={
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'User-Agent': self._user_agent,
|
||||||
|
},
|
||||||
timeout=MIHOME_HTTP_API_TIMEOUT
|
timeout=MIHOME_HTTP_API_TIMEOUT
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -601,15 +622,8 @@ class MIoTHttpClient:
|
|||||||
'bssid': device.get('bssid', None),
|
'bssid': device.get('bssid', None),
|
||||||
'order_time': device.get('orderTime', 0),
|
'order_time': device.get('orderTime', 0),
|
||||||
'fw_version': device.get('extra', {}).get(
|
'fw_version': device.get('extra', {}).get(
|
||||||
'fw_version', 'unknown'),
|
|
||||||
}
|
|
||||||
if isinstance(device.get('extra', None), dict) and device['extra']:
|
|
||||||
device_infos[did]['fw_version'] = device['extra'].get(
|
|
||||||
'fw_version', None)
|
'fw_version', None)
|
||||||
device_infos[did]['mcu_version'] = device['extra'].get(
|
}
|
||||||
'mcu_version', None)
|
|
||||||
device_infos[did]['platform'] = device['extra'].get(
|
|
||||||
'platform', None)
|
|
||||||
|
|
||||||
next_start_did = res_obj.get('next_start_did', None)
|
next_start_did = res_obj.get('next_start_did', None)
|
||||||
if res_obj.get('has_more', False) and next_start_did:
|
if res_obj.get('has_more', False) and next_start_did:
|
||||||
@@ -762,7 +776,18 @@ class MIoTHttpClient:
|
|||||||
if not props_buffer:
|
if not props_buffer:
|
||||||
_LOGGER.error('get prop error, empty request list')
|
_LOGGER.error('get prop error, empty request list')
|
||||||
return False
|
return False
|
||||||
results = await self.get_props_async(props_buffer)
|
try:
|
||||||
|
results = await self.get_props_async(props_buffer)
|
||||||
|
except Exception as err: # pylint: disable=broad-exception-caught
|
||||||
|
# If the batch request fails (timeout, network error, etc.), the
|
||||||
|
# pending futures in self._get_prop_list would otherwise stay
|
||||||
|
# unresolved forever. Subsequent get_prop_async calls with the
|
||||||
|
# same key reuse the dead future via the cache lookup at the top
|
||||||
|
# of get_prop_async, so the integration would never recover until
|
||||||
|
# restart. Fall through with empty results so the loop below
|
||||||
|
# drains every requested key with set_result(None).
|
||||||
|
_LOGGER.error('get prop batch failed, %s', err)
|
||||||
|
results = []
|
||||||
|
|
||||||
for result in results:
|
for result in results:
|
||||||
if not all(
|
if not all(
|
||||||
|
|||||||
@@ -52,17 +52,15 @@ import logging
|
|||||||
|
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
|
||||||
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
|
|
||||||
CONCENTRATION_PARTS_PER_BILLION,
|
|
||||||
CONCENTRATION_PARTS_PER_MILLION,
|
|
||||||
DEGREE,
|
DEGREE,
|
||||||
LIGHT_LUX,
|
LIGHT_LUX,
|
||||||
PERCENTAGE,
|
REVOLUTIONS_PER_MINUTE,
|
||||||
SIGNAL_STRENGTH_DECIBELS,
|
SIGNAL_STRENGTH_DECIBELS,
|
||||||
|
UnitOfBloodGlucoseConcentration,
|
||||||
UnitOfEnergy,
|
UnitOfEnergy,
|
||||||
UnitOfElectricCurrent,
|
UnitOfElectricCurrent,
|
||||||
UnitOfElectricPotential,
|
UnitOfElectricPotential,
|
||||||
|
UnitOfFrequency,
|
||||||
UnitOfInformation,
|
UnitOfInformation,
|
||||||
UnitOfLength,
|
UnitOfLength,
|
||||||
UnitOfMass,
|
UnitOfMass,
|
||||||
@@ -102,9 +100,52 @@ from .miot_spec import (
|
|||||||
MIoTSpecValueRange
|
MIoTSpecValueRange
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try: # UnitOfDensity and UnitOfRatio are introduced in HA core 2026.7
|
||||||
|
from homeassistant.const import UnitOfDensity, UnitOfRatio
|
||||||
|
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = (
|
||||||
|
UnitOfDensity.MICROGRAMS_PER_CUBIC_METER)
|
||||||
|
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER = (
|
||||||
|
UnitOfDensity.MILLIGRAMS_PER_CUBIC_METER)
|
||||||
|
CONCENTRATION_PARTS_PER_MILLION = UnitOfRatio.PARTS_PER_MILLION
|
||||||
|
CONCENTRATION_PARTS_PER_BILLION = UnitOfRatio.PARTS_PER_BILLION
|
||||||
|
PERCENTAGE = UnitOfRatio.PERCENTAGE
|
||||||
|
except ImportError:
|
||||||
|
from homeassistant.const import (
|
||||||
|
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||||
|
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
|
||||||
|
CONCENTRATION_PARTS_PER_BILLION,
|
||||||
|
CONCENTRATION_PARTS_PER_MILLION,
|
||||||
|
PERCENTAGE)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def ha_entity_domain(entity: Entity) -> str:
|
||||||
|
"""Return the Home Assistant platform domain of an entity.
|
||||||
|
|
||||||
|
Every entity mixes in a Home Assistant entity base class, e.g.
|
||||||
|
Light(MIoTServiceEntity, LightEntity), which is declared in
|
||||||
|
homeassistant.components.<domain>. Fall back to the integration domain
|
||||||
|
when no such base class is found.
|
||||||
|
"""
|
||||||
|
for cls in type(entity).__mro__:
|
||||||
|
module = cls.__module__ or ''
|
||||||
|
if module.startswith('homeassistant.components.'):
|
||||||
|
return module.split('.')[2]
|
||||||
|
return DOMAIN
|
||||||
|
|
||||||
|
|
||||||
|
def to_valid_entity_id(entity_id: str) -> str:
|
||||||
|
"""Return a valid entity_id.
|
||||||
|
|
||||||
|
The object_id is built from the MIoT-Spec-V2 instance, which may contain
|
||||||
|
characters that are not allowed in an entity_id, e.g. a description in
|
||||||
|
Chinese or a trailing separator.
|
||||||
|
"""
|
||||||
|
domain, _, object_id = entity_id.partition('.')
|
||||||
|
return f'{domain}.{slugify_name(object_id)}'
|
||||||
|
|
||||||
|
|
||||||
class MIoTEntityData:
|
class MIoTEntityData:
|
||||||
"""MIoT Entity Data."""
|
"""MIoT Entity Data."""
|
||||||
platform: str
|
platform: str
|
||||||
@@ -351,6 +392,18 @@ class MIoTDevice:
|
|||||||
f'{ha_domain}.{self._model_strs[0][:9]}_{self.did_tag}_'
|
f'{ha_domain}.{self._model_strs[0][:9]}_{self.did_tag}_'
|
||||||
f'{self._model_strs[-1][:20]}_s_{siid}_{description}')
|
f'{self._model_strs[-1][:20]}_s_{siid}_{description}')
|
||||||
|
|
||||||
|
def gen_service_entity_id_legacy(
|
||||||
|
self, ha_domain: str, siid: int
|
||||||
|
) -> list[str]:
|
||||||
|
"""Return the service entity ids generated by previous versions.
|
||||||
|
|
||||||
|
The description of the service was appended to the id, an entity
|
||||||
|
registered before that change is still stored under the id without it.
|
||||||
|
"""
|
||||||
|
return [
|
||||||
|
f'{ha_domain}.{self._model_strs[0][:9]}_{self.did_tag}_'
|
||||||
|
f'{self._model_strs[-1][:20]}_s_{siid}']
|
||||||
|
|
||||||
def gen_prop_entity_id(
|
def gen_prop_entity_id(
|
||||||
self, ha_domain: str, spec_name: str, siid: int, piid: int
|
self, ha_domain: str, spec_name: str, siid: int, piid: int
|
||||||
) -> str:
|
) -> str:
|
||||||
@@ -682,58 +735,66 @@ class MIoTDevice:
|
|||||||
|
|
||||||
def unit_convert(self, spec_unit: str) -> Optional[str]:
|
def unit_convert(self, spec_unit: str) -> Optional[str]:
|
||||||
"""Convert MIoT unit to Home Assistant unit.
|
"""Convert MIoT unit to Home Assistant unit.
|
||||||
25/01/20: All online prop unit statistical tables: unit, quantity.
|
2026/01/06: property unit statistics of the latest released
|
||||||
|
MIoT-Spec-V2 for all device models: unit, quantity.
|
||||||
{
|
{
|
||||||
"no_unit": 148499,
|
"no_unit": 148499,
|
||||||
"percentage": 10042,
|
"percentage": 12074,
|
||||||
"kelvin": 1895,
|
"none": 11857,
|
||||||
"rgb": 772, // color
|
"minutes": 5707,
|
||||||
"celsius": 5762,
|
"celsius": 5767,
|
||||||
"none": 16106,
|
"seconds": 3062,
|
||||||
"hours": 1540,
|
"kelvin": 2511,
|
||||||
"minutes": 5061,
|
"hours": 1380,
|
||||||
"ms": 27,
|
"days": 615,
|
||||||
"watt": 216,
|
"rgb": 752, // color
|
||||||
"arcdegrees": 159,
|
"L": 379,
|
||||||
"ppm": 177,
|
"mg/m3": 335,
|
||||||
"μg/m3": 106,
|
"ppm": 182,
|
||||||
"days": 571,
|
"watt": 246,
|
||||||
"seconds": 2749,
|
"arcdegrees": 130,
|
||||||
|
"μg/m3": 117,
|
||||||
|
"kWh": 149,
|
||||||
|
"ms": 108,
|
||||||
|
"pascal": 108,
|
||||||
|
"lux": 100,
|
||||||
|
"V": 59,
|
||||||
|
"m": 45,
|
||||||
|
"A": 36,
|
||||||
|
"mL": 30,
|
||||||
|
"arcdegress": 25,
|
||||||
|
"mA": 26,
|
||||||
|
"bpm": 21, // realtime-heartrate
|
||||||
"B/s": 21,
|
"B/s": 21,
|
||||||
"pascal": 110,
|
"weeks": 18,
|
||||||
"mg/m3": 339,
|
"dB": 17,
|
||||||
"lux": 125,
|
"calorie": 18, // 1 cal = 4.184 J
|
||||||
"kWh": 124,
|
"metre": 15,
|
||||||
"mv": 2,
|
"hour": 11,
|
||||||
"V": 38,
|
"cm": 12,
|
||||||
"A": 29,
|
"gram": 8,
|
||||||
"mV": 4,
|
"km/h": 8,
|
||||||
"L": 352,
|
"mV": 9,
|
||||||
"m": 37,
|
"times": 4, // exercise-count
|
||||||
"毫摩尔每升": 2, // blood-sugar, cholesterol
|
"kCal": 4,
|
||||||
"mmol/L": 1, // urea
|
|
||||||
"weeks": 26,
|
|
||||||
"meter": 3,
|
|
||||||
"dB": 26,
|
|
||||||
"hour": 14,
|
|
||||||
"calorie": 19, // 1 cal = 4.184 J
|
|
||||||
"ppb": 3,
|
|
||||||
"arcdegress": 30,
|
|
||||||
"bpm": 4, // realtime-heartrate
|
|
||||||
"gram": 7,
|
|
||||||
"km/h": 9,
|
|
||||||
"W": 1,
|
|
||||||
"m3/h": 2,
|
|
||||||
"kilopascal": 1,
|
|
||||||
"mL": 4,
|
|
||||||
"mmHg": 4,
|
"mmHg": 4,
|
||||||
|
"pcs": 3,
|
||||||
|
"meter": 3,
|
||||||
|
"kW": 2,
|
||||||
|
"KByte/s": 2,
|
||||||
|
"毫摩尔每升": 2, // blood-sugar, cholesterol
|
||||||
|
"m3/h": 2,
|
||||||
|
"ppb": 2,
|
||||||
|
"mv": 2,
|
||||||
"w": 1,
|
"w": 1,
|
||||||
|
"bar": 1,
|
||||||
|
"megapascal": 1,
|
||||||
|
"kB": 1,
|
||||||
|
"mmol/L": 1, // urea
|
||||||
|
"min/km": 1,
|
||||||
|
"kilopascal": 1,
|
||||||
"liter": 1,
|
"liter": 1,
|
||||||
"cm": 3,
|
"W": 1
|
||||||
"mA": 2,
|
|
||||||
"kilogram": 2,
|
|
||||||
"kcal/d": 2, // basal-metabolism
|
|
||||||
"times": 1 // exercise-count
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
unit_map = {
|
unit_map = {
|
||||||
@@ -761,6 +822,9 @@ class MIoTDevice:
|
|||||||
'L': UnitOfVolume.LITERS,
|
'L': UnitOfVolume.LITERS,
|
||||||
'liter': UnitOfVolume.LITERS,
|
'liter': UnitOfVolume.LITERS,
|
||||||
'mL': UnitOfVolume.MILLILITERS,
|
'mL': UnitOfVolume.MILLILITERS,
|
||||||
|
'Hz': UnitOfFrequency.HERTZ,
|
||||||
|
'calorie': UnitOfEnergy.CALORIE,
|
||||||
|
'kCal': UnitOfEnergy.KILO_CALORIE,
|
||||||
'km/h': UnitOfSpeed.KILOMETERS_PER_HOUR,
|
'km/h': UnitOfSpeed.KILOMETERS_PER_HOUR,
|
||||||
'm/s': UnitOfSpeed.METERS_PER_SECOND,
|
'm/s': UnitOfSpeed.METERS_PER_SECOND,
|
||||||
'watt': UnitOfPower.WATT,
|
'watt': UnitOfPower.WATT,
|
||||||
@@ -779,6 +843,9 @@ class MIoTDevice:
|
|||||||
'meter': UnitOfLength.METERS,
|
'meter': UnitOfLength.METERS,
|
||||||
'km': UnitOfLength.KILOMETERS,
|
'km': UnitOfLength.KILOMETERS,
|
||||||
'm3/h': UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
|
'm3/h': UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
|
||||||
|
'毫摩尔每升': UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
|
||||||
|
'mmol/L': UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
|
||||||
|
'rpm': REVOLUTIONS_PER_MINUTE,
|
||||||
'gram': UnitOfMass.GRAMS,
|
'gram': UnitOfMass.GRAMS,
|
||||||
'kilogram': UnitOfMass.KILOGRAMS,
|
'kilogram': UnitOfMass.KILOGRAMS,
|
||||||
'dB': SIGNAL_STRENGTH_DECIBELS,
|
'dB': SIGNAL_STRENGTH_DECIBELS,
|
||||||
@@ -790,6 +857,7 @@ class MIoTDevice:
|
|||||||
'TB': UnitOfInformation.TERABYTES,
|
'TB': UnitOfInformation.TERABYTES,
|
||||||
'B/s': UnitOfDataRate.BYTES_PER_SECOND,
|
'B/s': UnitOfDataRate.BYTES_PER_SECOND,
|
||||||
'KB/s': UnitOfDataRate.KILOBYTES_PER_SECOND,
|
'KB/s': UnitOfDataRate.KILOBYTES_PER_SECOND,
|
||||||
|
'KByte/s': UnitOfDataRate.KILOBYTES_PER_SECOND,
|
||||||
'MB/s': UnitOfDataRate.MEGABYTES_PER_SECOND,
|
'MB/s': UnitOfDataRate.MEGABYTES_PER_SECOND,
|
||||||
'GB/s': UnitOfDataRate.GIGABYTES_PER_SECOND
|
'GB/s': UnitOfDataRate.GIGABYTES_PER_SECOND
|
||||||
}
|
}
|
||||||
@@ -862,6 +930,8 @@ class MIoTDevice:
|
|||||||
return 'mdi:network'
|
return 'mdi:network'
|
||||||
if spec_unit in {'calorie', 'kCal'}:
|
if spec_unit in {'calorie', 'kCal'}:
|
||||||
return 'mdi:food'
|
return 'mdi:food'
|
||||||
|
if spec_unit in {'rpm'}:
|
||||||
|
return 'mdi:fan-clock'
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def __gen_sub_id(self) -> int:
|
def __gen_sub_id(self) -> int:
|
||||||
@@ -913,19 +983,28 @@ class MIoTServiceEntity(Entity):
|
|||||||
self._state_sub_id = 0
|
self._state_sub_id = 0
|
||||||
self._value_sub_ids = {}
|
self._value_sub_ids = {}
|
||||||
# Gen entity id
|
# Gen entity id
|
||||||
|
# The unique_id keeps the integration domain so that it stays the same
|
||||||
|
# for the entities that are already registered, the entity_id uses the
|
||||||
|
# Home Assistant platform domain and must be a valid entity_id.
|
||||||
|
ha_domain = ha_entity_domain(self)
|
||||||
if isinstance(self.entity_data.spec, MIoTSpecInstance):
|
if isinstance(self.entity_data.spec, MIoTSpecInstance):
|
||||||
self.entity_id = miot_device.gen_device_entity_id(DOMAIN)
|
self._attr_unique_id = miot_device.gen_device_entity_id(DOMAIN)
|
||||||
|
self.entity_id = to_valid_entity_id(
|
||||||
|
miot_device.gen_device_entity_id(ha_domain))
|
||||||
self._attr_name = f' {self.entity_data.spec.description_trans}'
|
self._attr_name = f' {self.entity_data.spec.description_trans}'
|
||||||
elif isinstance(self.entity_data.spec, MIoTSpecService):
|
elif isinstance(self.entity_data.spec, MIoTSpecService):
|
||||||
self.entity_id = miot_device.gen_service_entity_id(
|
self._attr_unique_id = miot_device.gen_service_entity_id(
|
||||||
DOMAIN, siid=self.entity_data.spec.iid,
|
DOMAIN, siid=self.entity_data.spec.iid,
|
||||||
description=self.entity_data.spec.description)
|
description=self.entity_data.spec.description)
|
||||||
|
self.entity_id = to_valid_entity_id(
|
||||||
|
miot_device.gen_service_entity_id(
|
||||||
|
ha_domain, siid=self.entity_data.spec.iid,
|
||||||
|
description=self.entity_data.spec.description))
|
||||||
self._attr_name = (
|
self._attr_name = (
|
||||||
f'{"* "if self.entity_data.spec.proprietary else " "}'
|
f'{"* "if self.entity_data.spec.proprietary else " "}'
|
||||||
f'{self.entity_data.spec.description_trans}')
|
f'{self.entity_data.spec.description_trans}')
|
||||||
self._attr_entity_category = entity_data.spec.entity_category
|
self._attr_entity_category = entity_data.spec.entity_category
|
||||||
# Set entity attr
|
# Set entity attr
|
||||||
self._attr_unique_id = self.entity_id
|
|
||||||
self._attr_should_poll = False
|
self._attr_should_poll = False
|
||||||
self._attr_has_entity_name = True
|
self._attr_has_entity_name = True
|
||||||
self._attr_available = miot_device.online
|
self._attr_available = miot_device.online
|
||||||
@@ -1220,11 +1299,15 @@ class MIoTPropertyEntity(Entity):
|
|||||||
self._value_sub_id = 0
|
self._value_sub_id = 0
|
||||||
self._pending_write_ha_state_timer = None
|
self._pending_write_ha_state_timer = None
|
||||||
# Gen entity_id
|
# Gen entity_id
|
||||||
self.entity_id = self.miot_device.gen_prop_entity_id(
|
# The unique_id keeps the integration domain, see MIoTServiceEntity
|
||||||
|
self._attr_unique_id = self.miot_device.gen_prop_entity_id(
|
||||||
ha_domain=DOMAIN, spec_name=spec.name,
|
ha_domain=DOMAIN, spec_name=spec.name,
|
||||||
siid=spec.service.iid, piid=spec.iid)
|
siid=spec.service.iid, piid=spec.iid)
|
||||||
|
self.entity_id = to_valid_entity_id(
|
||||||
|
self.miot_device.gen_prop_entity_id(
|
||||||
|
ha_domain=ha_entity_domain(self), spec_name=spec.name,
|
||||||
|
siid=spec.service.iid, piid=spec.iid))
|
||||||
# Set entity attr
|
# Set entity attr
|
||||||
self._attr_unique_id = self.entity_id
|
|
||||||
self._attr_should_poll = False
|
self._attr_should_poll = False
|
||||||
self._attr_has_entity_name = True
|
self._attr_has_entity_name = True
|
||||||
self._attr_name = (
|
self._attr_name = (
|
||||||
@@ -1362,11 +1445,15 @@ class MIoTEventEntity(Entity):
|
|||||||
self.service = spec.service
|
self.service = spec.service
|
||||||
self._main_loop = miot_device.miot_client.main_loop
|
self._main_loop = miot_device.miot_client.main_loop
|
||||||
# Gen entity_id
|
# Gen entity_id
|
||||||
self.entity_id = self.miot_device.gen_event_entity_id(
|
# The unique_id keeps the integration domain, see MIoTServiceEntity
|
||||||
|
self._attr_unique_id = self.miot_device.gen_event_entity_id(
|
||||||
ha_domain=DOMAIN, spec_name=spec.name,
|
ha_domain=DOMAIN, spec_name=spec.name,
|
||||||
siid=spec.service.iid, eiid=spec.iid)
|
siid=spec.service.iid, eiid=spec.iid)
|
||||||
|
self.entity_id = to_valid_entity_id(
|
||||||
|
self.miot_device.gen_event_entity_id(
|
||||||
|
ha_domain=ha_entity_domain(self), spec_name=spec.name,
|
||||||
|
siid=spec.service.iid, eiid=spec.iid))
|
||||||
# Set entity attr
|
# Set entity attr
|
||||||
self._attr_unique_id = self.entity_id
|
|
||||||
self._attr_should_poll = False
|
self._attr_should_poll = False
|
||||||
self._attr_has_entity_name = True
|
self._attr_has_entity_name = True
|
||||||
self._attr_name = (
|
self._attr_name = (
|
||||||
@@ -1473,11 +1560,15 @@ class MIoTActionEntity(Entity):
|
|||||||
self._main_loop = miot_device.miot_client.main_loop
|
self._main_loop = miot_device.miot_client.main_loop
|
||||||
self._state_sub_id = 0
|
self._state_sub_id = 0
|
||||||
# Gen entity_id
|
# Gen entity_id
|
||||||
self.entity_id = self.miot_device.gen_action_entity_id(
|
# The unique_id keeps the integration domain, see MIoTServiceEntity
|
||||||
|
self._attr_unique_id = self.miot_device.gen_action_entity_id(
|
||||||
ha_domain=DOMAIN, spec_name=spec.name,
|
ha_domain=DOMAIN, spec_name=spec.name,
|
||||||
siid=spec.service.iid, aiid=spec.iid)
|
siid=spec.service.iid, aiid=spec.iid)
|
||||||
|
self.entity_id = to_valid_entity_id(
|
||||||
|
self.miot_device.gen_action_entity_id(
|
||||||
|
ha_domain=ha_entity_domain(self), spec_name=spec.name,
|
||||||
|
siid=spec.service.iid, aiid=spec.iid))
|
||||||
# Set entity attr
|
# Set entity attr
|
||||||
self._attr_unique_id = self.entity_id
|
|
||||||
self._attr_should_poll = False
|
self._attr_should_poll = False
|
||||||
self._attr_has_entity_name = True
|
self._attr_has_entity_name = True
|
||||||
self._attr_name = (
|
self._attr_name = (
|
||||||
|
|||||||
@@ -482,7 +482,7 @@ class _MipsClient(ABC):
|
|||||||
self,
|
self,
|
||||||
payload: Optional[str] = None,
|
payload: Optional[str] = None,
|
||||||
timeout_ms: int = 10000
|
timeout_ms: int = 10000
|
||||||
) -> dict[str, dict]: ...
|
) -> Optional[dict[str, dict]]: ...
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
async def get_prop_async(
|
async def get_prop_async(
|
||||||
@@ -631,9 +631,10 @@ class _MipsClient(ABC):
|
|||||||
ca_certs=self._ca_file,
|
ca_certs=self._ca_file,
|
||||||
certfile=self._cert_file,
|
certfile=self._cert_file,
|
||||||
keyfile=self._key_file)
|
keyfile=self._key_file)
|
||||||
|
self._mqtt.tls_insecure_set(True)
|
||||||
else:
|
else:
|
||||||
self._mqtt.tls_set(tls_version=ssl.PROTOCOL_TLS_CLIENT)
|
self._mqtt.tls_set(tls_version=ssl.PROTOCOL_TLS_CLIENT)
|
||||||
self._mqtt.tls_insecure_set(True)
|
self._mqtt.tls_insecure_set(False)
|
||||||
self._mqtt.on_connect = self.__on_connect
|
self._mqtt.on_connect = self.__on_connect
|
||||||
self._mqtt.on_connect_fail = self.__on_connect_failed
|
self._mqtt.on_connect_fail = self.__on_connect_failed
|
||||||
self._mqtt.on_disconnect = self.__on_disconnect
|
self._mqtt.on_disconnect = self.__on_disconnect
|
||||||
@@ -1030,7 +1031,7 @@ class MipsCloudClient(_MipsClient):
|
|||||||
|
|
||||||
async def get_dev_list_async(
|
async def get_dev_list_async(
|
||||||
self, payload: Optional[str] = None, timeout_ms: int = 10000
|
self, payload: Optional[str] = None, timeout_ms: int = 10000
|
||||||
) -> dict[str, dict]:
|
) -> Optional[dict[str, dict]]:
|
||||||
raise NotImplementedError('please call in http client')
|
raise NotImplementedError('please call in http client')
|
||||||
|
|
||||||
async def get_prop_async(
|
async def get_prop_async(
|
||||||
@@ -1101,7 +1102,16 @@ class MipsCloudClient(_MipsClient):
|
|||||||
if not bc_list:
|
if not bc_list:
|
||||||
return
|
return
|
||||||
# The message from the cloud is not packed.
|
# The message from the cloud is not packed.
|
||||||
payload_str: str = payload.decode('utf-8')
|
try:
|
||||||
|
payload_str: str = payload.decode('utf-8')
|
||||||
|
except UnicodeDecodeError as err:
|
||||||
|
# Some cloud pushes carry a payload that is not valid UTF-8.
|
||||||
|
# Drop the message instead of raising, otherwise the exception
|
||||||
|
# aborts paho's read loop and subsequent messages may be lost.
|
||||||
|
self.log_error(
|
||||||
|
f'on message, drop non-utf-8 payload, {err}, {topic}, '
|
||||||
|
f'{payload.hex()}')
|
||||||
|
return
|
||||||
# self.log_debug(f"on broadcast, {topic}, {payload}")
|
# self.log_debug(f"on broadcast, {topic}, {payload}")
|
||||||
for item in bc_list or []:
|
for item in bc_list or []:
|
||||||
if item.handler is None:
|
if item.handler is None:
|
||||||
@@ -1375,12 +1385,13 @@ class MipsLocalClient(_MipsClient):
|
|||||||
@final
|
@final
|
||||||
async def get_dev_list_async(
|
async def get_dev_list_async(
|
||||||
self, payload: Optional[str] = None, timeout_ms: int = 10000
|
self, payload: Optional[str] = None, timeout_ms: int = 10000
|
||||||
) -> dict[str, dict]:
|
) -> Optional[dict[str, dict]]:
|
||||||
result_obj = await self.__request_async(
|
result_obj = await self.__request_async(
|
||||||
topic='proxy/getDevList', payload=payload or '{}',
|
topic='proxy/getDevList', payload=payload or '{}',
|
||||||
timeout_ms=timeout_ms)
|
timeout_ms=timeout_ms)
|
||||||
if not result_obj or 'devList' not in result_obj:
|
if not result_obj or 'devList' not in result_obj:
|
||||||
raise MIoTMipsError('invalid result')
|
self.log_error(f'get dev list failed, invalid result, {payload}')
|
||||||
|
return None
|
||||||
device_list = {}
|
device_list = {}
|
||||||
for did, info in result_obj['devList'].items():
|
for did, info in result_obj['devList'].items():
|
||||||
name: str = info.get('name', None)
|
name: str = info.get('name', None)
|
||||||
@@ -1394,19 +1405,9 @@ class MipsLocalClient(_MipsClient):
|
|||||||
continue
|
continue
|
||||||
device_list[did] = {
|
device_list[did] = {
|
||||||
'did': did,
|
'did': did,
|
||||||
'name': name,
|
|
||||||
'urn': urn,
|
|
||||||
'model': model,
|
|
||||||
'online': info.get('online', False),
|
'online': info.get('online', False),
|
||||||
'icon': info.get('icon', None),
|
|
||||||
'fw_version': None,
|
|
||||||
'home_id': '',
|
|
||||||
'home_name': '',
|
|
||||||
'room_id': info.get('roomId', ''),
|
|
||||||
'room_name': info.get('roomName', ''),
|
|
||||||
'specv2_access': info.get('specV2Access', False),
|
'specv2_access': info.get('specV2Access', False),
|
||||||
'push_available': info.get('pushAvailable', False),
|
'push_available': info.get('pushAvailable', False)
|
||||||
'manufacturer': model.split('.')[0],
|
|
||||||
}
|
}
|
||||||
return device_list
|
return device_list
|
||||||
|
|
||||||
|
|||||||
@@ -617,7 +617,8 @@ class MIoTSpecProperty(_MIoTSpecBase):
|
|||||||
if self.value_range is None:
|
if self.value_range is None:
|
||||||
return int(round(value))
|
return int(round(value))
|
||||||
return int(
|
return int(
|
||||||
round(value / self.value_range.step) * self.value_range.step)
|
round((value - self.value_range.min_) / self.value_range.step) *
|
||||||
|
self.value_range.step + self.value_range.min_)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def dump(self) -> dict:
|
def dump(self) -> dict:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,13 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:daikin-k2:1:
|
|||||||
access:
|
access:
|
||||||
- read
|
- read
|
||||||
- notify
|
- notify
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:daikin-k5:1:
|
||||||
|
prop.2.2:
|
||||||
|
format: string
|
||||||
|
expr: '{"COOL":0,"DEHUMI":1,"DRY":1,"FAN":2,"HEAT":4}.get(src_value,src_value)'
|
||||||
|
prop.3.1:
|
||||||
|
format: string
|
||||||
|
expr: '{"LOW": 0}.get(src_value, src_value)'
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:qdhkl-a42:1:
|
urn:miot-spec-v2:device:air-conditioner:0000A004:qdhkl-a42:1:
|
||||||
prop.2.2:
|
prop.2.2:
|
||||||
value-list:
|
value-list:
|
||||||
@@ -54,6 +61,9 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c35:1:
|
|||||||
prop.10.6:
|
prop.10.6:
|
||||||
unit: none
|
unit: none
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c35:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c35:1
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c35:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c35:1
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h09h00:4:
|
||||||
|
prop.10.6:
|
||||||
|
unit: none
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h40h00:1:
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h40h00:1:
|
||||||
prop.10.6:
|
prop.10.6:
|
||||||
unit: none
|
unit: none
|
||||||
@@ -67,6 +77,33 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1:
|
|||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:3: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:3: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:4: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:4: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m28:5:
|
||||||
|
prop.9.5:
|
||||||
|
unit: days
|
||||||
|
prop.10.6:
|
||||||
|
unit: none
|
||||||
|
prop.12.3:
|
||||||
|
unit: rpm
|
||||||
|
prop.12.11:
|
||||||
|
unit: Hz
|
||||||
|
prop.12.13:
|
||||||
|
unit: A
|
||||||
|
prop.12.14:
|
||||||
|
unit: V
|
||||||
|
prop.12.15:
|
||||||
|
unit: pascal
|
||||||
|
prop.12.17:
|
||||||
|
unit: rpm
|
||||||
|
prop.12.21:
|
||||||
|
unit: celsius
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:1:
|
||||||
|
prop.10.6:
|
||||||
|
unit: none
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:1
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:3: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:1
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:4: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:1
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:5: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:1
|
||||||
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:6: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m4:1
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:1: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:1: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6
|
||||||
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:3: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6
|
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:3: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m9:6
|
||||||
@@ -155,6 +192,19 @@ urn:miot-spec-v2:device:airer:0000A00D:mrbond-m33a:1:
|
|||||||
name: current-position-a
|
name: current-position-a
|
||||||
prop.2.11:
|
prop.2.11:
|
||||||
name: current-position-b
|
name: current-position-b
|
||||||
|
urn:miot-spec-v2:device:bath-heater:0000A028:aupu-qa3s:1:
|
||||||
|
prop.5.2:
|
||||||
|
value-list:
|
||||||
|
- value: 1
|
||||||
|
description: Level_1
|
||||||
|
- value: 2
|
||||||
|
description: Level_2
|
||||||
|
- value: 3
|
||||||
|
description: Level_3
|
||||||
|
- value: 4
|
||||||
|
description: Level_4
|
||||||
|
- value: 5
|
||||||
|
description: Level_5
|
||||||
urn:miot-spec-v2:device:bath-heater:0000A028:mike-2:1:
|
urn:miot-spec-v2:device:bath-heater:0000A028:mike-2:1:
|
||||||
prop.3.1:
|
prop.3.1:
|
||||||
name: mode-a
|
name: mode-a
|
||||||
@@ -171,6 +221,9 @@ urn:miot-spec-v2:device:bath-heater:0000A028:opple-acmoto:1:
|
|||||||
description: medium
|
description: medium
|
||||||
- value: 255
|
- value: 255
|
||||||
description: high
|
description: high
|
||||||
|
urn:miot-spec-v2:device:bath-heater:0000A028:xiaomi-na2:2:
|
||||||
|
prop.5.8:
|
||||||
|
name: fan-level-a
|
||||||
urn:miot-spec-v2:device:bath-heater:0000A028:xiaomi-s1:1:
|
urn:miot-spec-v2:device:bath-heater:0000A028:xiaomi-s1:1:
|
||||||
prop.4.4:
|
prop.4.4:
|
||||||
name: fan-level-ventilation
|
name: fan-level-ventilation
|
||||||
@@ -255,6 +308,9 @@ urn:miot-spec-v2:device:fan:0000A005:dmaker-p33:1:
|
|||||||
urn:miot-spec-v2:device:fan:0000A005:dmaker-p5:1:
|
urn:miot-spec-v2:device:fan:0000A005:dmaker-p5:1:
|
||||||
prop.2.4:
|
prop.2.4:
|
||||||
name: fan-level-a
|
name: fan-level-a
|
||||||
|
urn:miot-spec-v2:device:fan:0000A005:rw02-rw001:1:0000D062:
|
||||||
|
prop.2.4:
|
||||||
|
name: fan-level-a
|
||||||
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p43:1:
|
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p43:1:
|
||||||
prop.2.2:
|
prop.2.2:
|
||||||
name: fan-level-a
|
name: fan-level-a
|
||||||
@@ -319,6 +375,7 @@ urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:3:
|
|||||||
prop.3.1:
|
prop.3.1:
|
||||||
name: on-ventilation
|
name: on-ventilation
|
||||||
urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:4: urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:3
|
urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:4: urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:3
|
||||||
|
urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:5: urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:3
|
||||||
urn:miot-spec-v2:device:humidifier:0000A00E:zhimi-ca4:2:
|
urn:miot-spec-v2:device:humidifier:0000A00E:zhimi-ca4:2:
|
||||||
prop.2.7:
|
prop.2.7:
|
||||||
unit: percentage
|
unit: percentage
|
||||||
@@ -483,6 +540,17 @@ urn:miot-spec-v2:device:plant-monitor:0000A030:hhcc-v1:1:
|
|||||||
name: soil-ec
|
name: soil-ec
|
||||||
icon: mdi:sprout-outline
|
icon: mdi:sprout-outline
|
||||||
unit: μS/cm
|
unit: μS/cm
|
||||||
|
urn:miot-spec-v2:device:relay:0000A03D:hey-h100:1:
|
||||||
|
prop.3.1:
|
||||||
|
unit: kWh
|
||||||
|
format: float
|
||||||
|
value-range:
|
||||||
|
- 0
|
||||||
|
- 100000000
|
||||||
|
- 0.01
|
||||||
|
expr: round(src_value/100, 2)
|
||||||
|
prop.3.2:
|
||||||
|
unit: mA
|
||||||
urn:miot-spec-v2:device:relay:0000A03D:lumi-c2acn01:1:
|
urn:miot-spec-v2:device:relay:0000A03D:lumi-c2acn01:1:
|
||||||
prop.4.1:
|
prop.4.1:
|
||||||
unit: kWh
|
unit: kWh
|
||||||
@@ -499,6 +567,26 @@ urn:miot-spec-v2:device:safe-box:0000A042:loock-v1:1:
|
|||||||
prop.5.1:
|
prop.5.1:
|
||||||
name: contact-state
|
name: contact-state
|
||||||
expr: (src_value!=1)
|
expr: (src_value!=1)
|
||||||
|
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-l04m:2:
|
||||||
|
prop.3.1:
|
||||||
|
access:
|
||||||
|
- read
|
||||||
|
- notify
|
||||||
|
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx04:2:
|
||||||
|
prop.3.1:
|
||||||
|
access:
|
||||||
|
- read
|
||||||
|
- notify
|
||||||
|
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx06:2:
|
||||||
|
prop.3.1:
|
||||||
|
access:
|
||||||
|
- read
|
||||||
|
- notify
|
||||||
|
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-x08c:2:
|
||||||
|
prop.2.1:
|
||||||
|
access:
|
||||||
|
- read
|
||||||
|
- notify
|
||||||
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-x08e:1:
|
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-x08e:1:
|
||||||
prop.3.1:
|
prop.3.1:
|
||||||
name: playing-state-a
|
name: playing-state-a
|
||||||
@@ -559,6 +647,9 @@ urn:miot-spec-v2:device:thermostat:0000A031:suittc-wk168:1:
|
|||||||
description: '15'
|
description: '15'
|
||||||
- value: 16
|
- value: 16
|
||||||
description: '16'
|
description: '16'
|
||||||
|
urn:miot-spec-v2:device:toothbrush:0000A07E:xiaomi-p001:1:
|
||||||
|
prop.4.1041:
|
||||||
|
unit: days
|
||||||
urn:miot-spec-v2:device:water-purifier:0000A013:roswan-lte01:1:0000D05A:
|
urn:miot-spec-v2:device:water-purifier:0000A013:roswan-lte01:1:0000D05A:
|
||||||
prop.4.1:
|
prop.4.1:
|
||||||
unit: ppm
|
unit: ppm
|
||||||
|
|||||||
@@ -50,11 +50,22 @@ from homeassistant.components.sensor import SensorStateClass
|
|||||||
from homeassistant.components.event import EventDeviceClass
|
from homeassistant.components.event import EventDeviceClass
|
||||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||||
|
|
||||||
from homeassistant.const import (CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
from homeassistant.const import (EntityCategory, LIGHT_LUX, UnitOfEnergy,
|
||||||
EntityCategory, LIGHT_LUX, UnitOfEnergy,
|
|
||||||
UnitOfPower, UnitOfElectricCurrent,
|
UnitOfPower, UnitOfElectricCurrent,
|
||||||
UnitOfElectricPotential, UnitOfTemperature,
|
UnitOfElectricPotential, UnitOfTemperature,
|
||||||
UnitOfPressure, PERCENTAGE)
|
UnitOfPressure)
|
||||||
|
|
||||||
|
try: # UnitOfDensity and UnitOfRatio are introduced in HA core 2026.7
|
||||||
|
from homeassistant.const import UnitOfDensity, UnitOfRatio
|
||||||
|
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = (
|
||||||
|
UnitOfDensity.MICROGRAMS_PER_CUBIC_METER)
|
||||||
|
CONCENTRATION_PARTS_PER_MILLION = UnitOfRatio.PARTS_PER_MILLION
|
||||||
|
PERCENTAGE = UnitOfRatio.PERCENTAGE
|
||||||
|
except ImportError:
|
||||||
|
from homeassistant.const import (
|
||||||
|
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||||
|
CONCENTRATION_PARTS_PER_MILLION,
|
||||||
|
PERCENTAGE)
|
||||||
|
|
||||||
# pylint: disable=pointless-string-statement
|
# pylint: disable=pointless-string-statement
|
||||||
"""SPEC_DEVICE_TRANS_MAP
|
"""SPEC_DEVICE_TRANS_MAP
|
||||||
@@ -642,6 +653,12 @@ SPEC_PROP_TRANS_MAP: dict = {
|
|||||||
'entity': 'sensor',
|
'entity': 'sensor',
|
||||||
'state_class': SensorStateClass.MEASUREMENT
|
'state_class': SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
|
'co2-density': {
|
||||||
|
'device_class': SensorDeviceClass.CO2,
|
||||||
|
'entity': 'sensor',
|
||||||
|
'state_class': SensorStateClass.MEASUREMENT,
|
||||||
|
'unit_of_measurement': CONCENTRATION_PARTS_PER_MILLION
|
||||||
|
},
|
||||||
'battery-level': {
|
'battery-level': {
|
||||||
'device_class': SensorDeviceClass.BATTERY,
|
'device_class': SensorDeviceClass.BATTERY,
|
||||||
'entity': 'sensor',
|
'entity': 'sensor',
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Grundkonfiguration",
|
"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### Integrierte Netzwerkkonfiguration\r\nÜberprüfen Sie, ob das lokale Netzwerk normal funktioniert und ob die zugehörigen Netzwerkressourcen zugänglich sind. **Es wird empfohlen, dies beim ersten Hinzufügen auszuwählen.**\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 **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Integrierte Netzwerkkonfiguration\r\nÜberprüfen Sie, ob das lokale Netzwerk normal funktioniert und ob die zugehörigen Netzwerkressourcen zugänglich sind. **Es wird empfohlen, dies beim ersten Hinzufügen auszuwählen.**\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": {
|
"data": {
|
||||||
"cloud_server": "Anmeldegebiet",
|
"cloud_server": "Anmeldegebiet",
|
||||||
"integration_language": "Sprache",
|
"integration_language": "Sprache",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Integrierte Netzwerkkonfiguration",
|
"title": "Integrierte Netzwerkkonfiguration",
|
||||||
"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- Wenn Sie die Standarderkennungsadresse des Systems wiederherstellen möchten, geben Sie ein Komma `,` ein und klicken Sie auf 'Weiter'.\r\n- **Diese Konfiguration ist global und Änderungen wirken sich auf andere Integrationsinstanzen aus. Bitte ändern Sie sie mit Vorsicht.**\r\n### Überprüfung der Netzwerkabhängigkeiten\r\nÜberprüfen Sie nacheinander, ob die folgenden Netzwerkabhängigkeiten zugänglich sind. Wenn die entsprechenden Adressen nicht zugänglich sind, führt dies zu Integrationsfehlern.\r\n- OAuth2-Authentifizierungsadresse: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API-Adresse: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-Adresse: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker-Adresse: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Wenn Sie die Standarderkennungsadresse des Systems wiederherstellen möchten, geben Sie ein Komma `,` ein und klicken Sie auf 'Weiter'.\r\n- **Diese Konfiguration ist global und Änderungen wirken sich auf andere Integrationsinstanzen aus. Bitte ändern Sie sie mit Vorsicht.**\r\n### Überprüfung der Netzwerkabhängigkeiten\r\nÜberprüfen Sie nacheinander, ob die folgenden Netzwerkabhängigkeiten zugänglich sind. Wenn die entsprechenden Adressen nicht zugänglich sind, führt dies zu Integrationsfehlern.\r\n- OAuth2-Authentifizierungsadresse: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API-Adresse: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-Adresse: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker-Adresse: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Netzwerkerkennungsadresse",
|
"network_detect_addr": "Netzwerkerkennungsadresse",
|
||||||
"check_network_deps": "Überprüfung der Netzwerkabhängigkeiten"
|
"check_network_deps": "Überprüfung der Netzwerkabhängigkeiten"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Authentifizierungskonfiguration",
|
"title": "Authentifizierungskonfiguration",
|
||||||
"description": "Lokale Authentifizierungsinformationen sind abgelaufen. Starten Sie die Authentifizierung erneut.\r\n### Aktuelles Anmeldegebiet: {cloud_server}\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.",
|
"description": "Lokale Authentifizierungsinformationen sind abgelaufen. Starten Sie die Authentifizierung erneut.\r\n### Aktuelles Anmeldegebiet: {cloud_server}\r\n### OAuth2-Authentifizierungs-Umleitungs-URL\r\nDie Umleitungs-URL für die OAuth2-Authentifizierung lautet **[{oauth_redirect_url}]({oauth_redirect_url})**. 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.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "OAuth2-Authentifizierungs-Umleitungs-URL"
|
"oauth_redirect_url": "OAuth2-Authentifizierungs-Umleitungs-URL"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Integrierte Netzwerkkonfiguration",
|
"title": "Integrierte Netzwerkkonfiguration",
|
||||||
"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- Wenn Sie die Standarderkennungsadresse des Systems wiederherstellen möchten, geben Sie ein Komma `,` ein und klicken Sie auf 'Weiter'.\r\n- **Diese Konfiguration ist global und Änderungen wirken sich auf andere Integrationsinstanzen aus. Bitte ändern Sie sie mit Vorsicht.**\r\n### Überprüfung der Netzwerkabhängigkeiten\r\nÜberprüfen Sie nacheinander, ob die folgenden Netzwerkabhängigkeiten zugänglich sind. Wenn die entsprechenden Adressen nicht zugänglich sind, führt dies zu Integrationsfehlern.\r\n- OAuth2-Authentifizierungsadresse: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API-Adresse: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-Adresse: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker-Adresse: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Wenn Sie die Standarderkennungsadresse des Systems wiederherstellen möchten, geben Sie ein Komma `,` ein und klicken Sie auf 'Weiter'.\r\n- **Diese Konfiguration ist global und Änderungen wirken sich auf andere Integrationsinstanzen aus. Bitte ändern Sie sie mit Vorsicht.**\r\n### Überprüfung der Netzwerkabhängigkeiten\r\nÜberprüfen Sie nacheinander, ob die folgenden Netzwerkabhängigkeiten zugänglich sind. Wenn die entsprechenden Adressen nicht zugänglich sind, führt dies zu Integrationsfehlern.\r\n- OAuth2-Authentifizierungsadresse: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API-Adresse: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-Adresse: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker-Adresse: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Netzwerkerkennungsadresse",
|
"network_detect_addr": "Netzwerkerkennungsadresse",
|
||||||
"check_network_deps": "Überprüfung der Netzwerkabhängigkeiten"
|
"check_network_deps": "Überprüfung der Netzwerkabhängigkeiten"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Basic configuration",
|
"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### Integrated Network Configuration\r\nCheck if the local network is functioning properly and if the related network resources are accessible. **It is recommended to select this when adding for the first time.**\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 **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Integrated Network Configuration\r\nCheck if the local network is functioning properly and if the related network resources are accessible. **It is recommended to select this when adding for the first time.**\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": {
|
"data": {
|
||||||
"cloud_server": "Login Region",
|
"cloud_server": "Login Region",
|
||||||
"integration_language": "Language",
|
"integration_language": "Language",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Integrated Network Configuration",
|
"title": "Integrated Network 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- If you want to restore the system default detection address, please enter a comma `,` and click 'Next'.\r\n- **This configuration is global, and changes will affect other integration instances. Please modify with caution.**\r\n### Check Network Dependencies\r\nCheck the following network dependencies one by one to see if they are accessible. If the related addresses are not accessible, it will cause integration issues.\r\n- OAuth2 Authentication Address: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API Address: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Address: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker Address: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- If you want to restore the system default detection address, please enter a comma `,` and click 'Next'.\r\n- **This configuration is global, and changes will affect other integration instances. Please modify with caution.**\r\n### Check Network Dependencies\r\nCheck the following network dependencies one by one to see if they are accessible. If the related addresses are not accessible, it will cause integration issues.\r\n- OAuth2 Authentication Address: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API Address: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Address: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker Address: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Network Detection Address",
|
"network_detect_addr": "Network Detection Address",
|
||||||
"check_network_deps": "Check Network Dependencies"
|
"check_network_deps": "Check Network Dependencies"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Authentication Configuration",
|
"title": "Authentication Configuration",
|
||||||
"description": "Local authentication information has expired. Please restart the authentication process.\r\n### Current Login Region: {cloud_server}\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.",
|
"description": "Local authentication information has expired. Please restart the authentication process.\r\n### Current Login Region: {cloud_server}\r\n### OAuth2 Redirect URL\r\nThe OAuth2 authentication redirect address is **[{oauth_redirect_url}]({oauth_redirect_url})**. 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.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "OAuth2 Redirect URL"
|
"oauth_redirect_url": "OAuth2 Redirect URL"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Integrated Network Configuration",
|
"title": "Integrated Network 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- If you want to restore the system default detection address, please enter a comma `,` and click 'Next'.\r\n- **This configuration is global, and changes will affect other integration instances. Please modify with caution.**\r\n### Check Network Dependencies\r\nCheck the following network dependencies one by one to see if they are accessible. If the related addresses are not accessible, it will cause integration issues.\r\n- OAuth2 Authentication Address: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API Address: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Address: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker Address: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- If you want to restore the system default detection address, please enter a comma `,` and click 'Next'.\r\n- **This configuration is global, and changes will affect other integration instances. Please modify with caution.**\r\n### Check Network Dependencies\r\nCheck the following network dependencies one by one to see if they are accessible. If the related addresses are not accessible, it will cause integration issues.\r\n- OAuth2 Authentication Address: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API Address: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Address: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker Address: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Network Detection Address",
|
"network_detect_addr": "Network Detection Address",
|
||||||
"check_network_deps": "Check Network Dependencies"
|
"check_network_deps": "Check Network Dependencies"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuración básica",
|
"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### Configuración de Red Integrada\r\nVerifique si la red local funciona correctamente y si los recursos de red relacionados son accesibles. **Se recomienda seleccionar esto al agregar por primera vez.**\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 **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Configuración de Red Integrada\r\nVerifique si la red local funciona correctamente y si los recursos de red relacionados son accesibles. **Se recomienda seleccionar esto al agregar por primera vez.**\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": {
|
"data": {
|
||||||
"cloud_server": "Región de inicio de sesión",
|
"cloud_server": "Región de inicio de sesión",
|
||||||
"integration_language": "Idioma",
|
"integration_language": "Idioma",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuración de Red Integrada",
|
"title": "Configuración de Red Integrada",
|
||||||
"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- Si desea restaurar la dirección de detección predeterminada del sistema, ingrese una coma `,` y haga clic en 'Siguiente'.\r\n- **Esta configuración es global y los cambios afectarán a otras instancias de integración. Modifique con precaución.**\r\n### Verificar Dependencias de Red\r\nVerifique una por una las siguientes dependencias de red para ver si son accesibles. Si las direcciones relacionadas no son accesibles, causará problemas de integración.\r\n- Dirección de Autenticación OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Dirección de API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Dirección de API SPEC de Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Dirección del Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Si desea restaurar la dirección de detección predeterminada del sistema, ingrese una coma `,` y haga clic en 'Siguiente'.\r\n- **Esta configuración es global y los cambios afectarán a otras instancias de integración. Modifique con precaución.**\r\n### Verificar Dependencias de Red\r\nVerifique una por una las siguientes dependencias de red para ver si son accesibles. Si las direcciones relacionadas no son accesibles, causará problemas de integración.\r\n- Dirección de Autenticación OAuth2: `{oauth2_auth_url}`.\r\n- Dirección de API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Dirección de API SPEC de Xiaomi: `{spec_api_url}`.\r\n- Dirección del Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Dirección de Detección de Red",
|
"network_detect_addr": "Dirección de Detección de Red",
|
||||||
"check_network_deps": "Verificar Dependencias de Red"
|
"check_network_deps": "Verificar Dependencias de Red"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuración de autorización",
|
"title": "Configuración de autorización",
|
||||||
"description": "Se detectó que la información de autenticación local ha caducado, vuelva a autenticarse\r\n### Región de inicio de sesión actual: {cloud_server}\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.",
|
"description": "Se detectó que la información de autenticación local ha caducado, vuelva a autenticarse\r\n### Región de inicio de sesión actual: {cloud_server}\r\n### Dirección de redireccionamiento de autenticación de OAuth2\r\nLa dirección de redireccionamiento de autenticación de OAuth2 es **[{oauth_redirect_url}]({oauth_redirect_url})**. 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.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "Dirección de redireccionamiento de autenticación de OAuth2"
|
"oauth_redirect_url": "Dirección de redireccionamiento de autenticación de OAuth2"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuración de Red Integrada",
|
"title": "Configuración de Red Integrada",
|
||||||
"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- Si desea restaurar la dirección de detección predeterminada del sistema, ingrese una coma `,` y haga clic en 'Siguiente'.\r\n- **Esta configuración es global y los cambios afectarán a otras instancias de integración. Modifique con precaución.**\r\n### Verificar Dependencias de Red\r\nVerifique una por una las siguientes dependencias de red para ver si son accesibles. Si las direcciones relacionadas no son accesibles, causará problemas de integración.\r\n- Dirección de Autenticación OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Dirección de API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Dirección de API SPEC de Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Dirección del Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Si desea restaurar la dirección de detección predeterminada del sistema, ingrese una coma `,` y haga clic en 'Siguiente'.\r\n- **Esta configuración es global y los cambios afectarán a otras instancias de integración. Modifique con precaución.**\r\n### Verificar Dependencias de Red\r\nVerifique una por una las siguientes dependencias de red para ver si son accesibles. Si las direcciones relacionadas no son accesibles, causará problemas de integración.\r\n- Dirección de Autenticación OAuth2: `{oauth2_auth_url}`.\r\n- Dirección de API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Dirección de API SPEC de Xiaomi: `{spec_api_url}`.\r\n- Dirección del Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Dirección de Detección de Red",
|
"network_detect_addr": "Dirección de Detección de Red",
|
||||||
"check_network_deps": "Verificar Dependencias de Red"
|
"check_network_deps": "Verificar Dependencias de Red"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuration de base",
|
"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### Configuration Réseau Intégrée\r\nVérifiez si le réseau local fonctionne correctement et si les ressources réseau associées sont accessibles. **Il est recommandé de sélectionner cela lors du premier ajout.**\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 **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Configuration Réseau Intégrée\r\nVérifiez si le réseau local fonctionne correctement et si les ressources réseau associées sont accessibles. **Il est recommandé de sélectionner cela lors du premier ajout.**\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": {
|
"data": {
|
||||||
"cloud_server": "Région de connexion",
|
"cloud_server": "Région de connexion",
|
||||||
"integration_language": "Langue",
|
"integration_language": "Langue",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuration Réseau Intégrée",
|
"title": "Configuration Réseau Intégrée",
|
||||||
"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- Si vous souhaitez rétablir l'adresse de détection par défaut du système, veuillez entrer une virgule `,` et cliquer sur 'Suivant'.\r\n- **Cette configuration est globale et les modifications affecteront les autres instances d'intégration. Veuillez modifier avec prudence.**\r\n### Vérification des Dépendances Réseau\r\nVérifiez une par une les dépendances réseau suivantes pour voir si elles sont accessibles. Si les adresses associées ne sont pas accessibles, cela entraînera des problèmes d'intégration.\r\n- Adresse d'Authentification OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Adresse de l'API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Adresse de l'API SPEC de Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Adresse du Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Si vous souhaitez rétablir l'adresse de détection par défaut du système, veuillez entrer une virgule `,` et cliquer sur 'Suivant'.\r\n- **Cette configuration est globale et les modifications affecteront les autres instances d'intégration. Veuillez modifier avec prudence.**\r\n### Vérification des Dépendances Réseau\r\nVérifiez une par une les dépendances réseau suivantes pour voir si elles sont accessibles. Si les adresses associées ne sont pas accessibles, cela entraînera des problèmes d'intégration.\r\n- Adresse d'Authentification OAuth2: `{oauth2_auth_url}`.\r\n- Adresse de l'API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Adresse de l'API SPEC de Xiaomi: `{spec_api_url}`.\r\n- Adresse du Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Adresse de Détection Réseau",
|
"network_detect_addr": "Adresse de Détection Réseau",
|
||||||
"check_network_deps": "Vérification des Dépendances Réseau"
|
"check_network_deps": "Vérification des Dépendances Réseau"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuration d'authentification",
|
"title": "Configuration d'authentification",
|
||||||
"description": "Les informations d'authentification locales ont expiré. Veuillez recommencer l'authentification\r\n### Région de connexion actuelle : {cloud_server}\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.",
|
"description": "Les informations d'authentification locales ont expiré. Veuillez recommencer l'authentification\r\n### Région de connexion actuelle : {cloud_server}\r\n### Adresse de redirection de l'authentification OAuth2\r\nL'adresse de redirection de l'authentification OAuth2 est **[{oauth_redirect_url}]({oauth_redirect_url})**. 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.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "Adresse de redirection de l'authentification"
|
"oauth_redirect_url": "Adresse de redirection de l'authentification"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuration Réseau Intégrée",
|
"title": "Configuration Réseau Intégrée",
|
||||||
"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- Si vous souhaitez rétablir l'adresse de détection par défaut du système, veuillez entrer une virgule `,` et cliquer sur 'Suivant'.\r\n- **Cette configuration est globale et les modifications affecteront les autres instances d'intégration. Veuillez modifier avec prudence.**\r\n### Vérification des Dépendances Réseau\r\nVérifiez une par une les dépendances réseau suivantes pour voir si elles sont accessibles. Si les adresses associées ne sont pas accessibles, cela entraînera des problèmes d'intégration.\r\n- Adresse d'Authentification OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Adresse de l'API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Adresse de l'API SPEC de Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Adresse du Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Si vous souhaitez rétablir l'adresse de détection par défaut du système, veuillez entrer une virgule `,` et cliquer sur 'Suivant'.\r\n- **Cette configuration est globale et les modifications affecteront les autres instances d'intégration. Veuillez modifier avec prudence.**\r\n### Vérification des Dépendances Réseau\r\nVérifiez une par une les dépendances réseau suivantes pour voir si elles sont accessibles. Si les adresses associées ne sont pas accessibles, cela entraînera des problèmes d'intégration.\r\n- Adresse d'Authentification OAuth2: `{oauth2_auth_url}`.\r\n- Adresse de l'API HTTP de Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Adresse de l'API SPEC de Xiaomi: `{spec_api_url}`.\r\n- Adresse du Broker MQTT de Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Adresse de Détection Réseau",
|
"network_detect_addr": "Adresse de Détection Réseau",
|
||||||
"check_network_deps": "Vérification des Dépendances Réseau"
|
"check_network_deps": "Vérification des Dépendances Réseau"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configurazione di base",
|
"title": "Configurazione di base",
|
||||||
"description": "### Regione di Login\r\nSeleziona la regione del tuo account Xiaomi. Puoi trovarla nell'APP Xiaomi Home > Profilo (nel menu in basso) > Impostazioni aggiuntive > Informazioni su Xiaomi Home.\r\n### Lingua\r\nSeleziona la lingua dei nomi dei dispositivi e delle entità. Alcune frasi senza traduzione verranno visualizzate in inglese.\r\n### URL di reindirizzamento OAuth2\r\nL'indirizzo di reindirizzamento dell'autenticazione OAuth2 è **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant deve trovarsi nella stessa rete locale del terminale operativo corrente (ad esempio, il computer personale) e il terminale operativo deve poter accedere alla home page di Home Assistant tramite questo indirizzo. Altrimenti, l'autenticazione del login potrebbe fallire.\r\n### Nota\r\n- Per gli utenti con centinaia o più dispositivi Mi Home, l'aggiunta iniziale dell'integrazione richiederà del tempo. Si prega di essere pazienti.\r\n- Se Home Assistant è in esecuzione in un ambiente Docker, assicurarsi che la modalità di rete Docker sia impostata su host, altrimenti la funzionalità di controllo locale potrebbe non funzionare correttamente.\r\n- La funzionalità di controllo locale dell'integrazione ha alcune dipendenze. Si prega di leggere attentamente il README.",
|
"description": "### Regione di Login\r\nSeleziona la regione del tuo account Xiaomi. Puoi trovarla nell'APP Xiaomi Home > Profilo (nel menu in basso) > Impostazioni aggiuntive > Informazioni su Xiaomi Home.\r\n### Lingua\r\nSeleziona la lingua dei nomi dei dispositivi e delle entità. Alcune frasi senza traduzione verranno visualizzate in inglese.\r\n### URL di reindirizzamento OAuth2\r\nL'indirizzo di reindirizzamento dell'autenticazione OAuth2 è **[{oauth_redirect_url}]({oauth_redirect_url})**. Home Assistant deve trovarsi nella stessa rete locale del terminale operativo corrente (ad esempio, il computer personale) e il terminale operativo deve poter accedere alla home page di Home Assistant tramite questo indirizzo. Altrimenti, l'autenticazione del login potrebbe fallire.\r\n### Nota\r\n- Per gli utenti con centinaia o più dispositivi Mi Home, l'aggiunta iniziale dell'integrazione richiederà del tempo. Si prega di essere pazienti.\r\n- Se Home Assistant è in esecuzione in un ambiente Docker, assicurarsi che la modalità di rete Docker sia impostata su host, altrimenti la funzionalità di controllo locale potrebbe non funzionare correttamente.\r\n- La funzionalità di controllo locale dell'integrazione ha alcune dipendenze. Si prega di leggere attentamente il README.",
|
||||||
"data": {
|
"data": {
|
||||||
"cloud_server": "Regione di Login",
|
"cloud_server": "Regione di Login",
|
||||||
"integration_language": "Lingua",
|
"integration_language": "Lingua",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configurazione di Rete Integrata",
|
"title": "Configurazione di Rete Integrata",
|
||||||
"description": "## Introduzione all'uso\r\n### Indirizzo di Rilevamento della Rete\r\nUtilizzato per verificare se la rete funziona correttamente. Se non impostato, verrà utilizzato l'indirizzo di default del sistema. Se il controllo dell'indirizzo predefinito fallisce, puoi provare a inserire un indirizzo personalizzato.\r\n- Puoi inserire più indirizzi di rilevamento, separati da virgole, come `8.8.8.8,https://www.bing.com`\r\n- Se è un indirizzo IP, il rilevamento verrà eseguito tramite ping. Se è un indirizzo HTTP(s), il rilevamento verrà eseguito tramite richiesta HTTP GET.\r\n- Se desideri ripristinare l'indirizzo di rilevamento predefinito del sistema, inserisci una virgola `,` e fai clic su 'Avanti'.\r\n- **Questa configurazione è globale e le modifiche influenzeranno altre istanze di integrazione. Si prega di modificare con cautela.**\r\n### Controlla le Dipendenze di Rete\r\nControlla una per una le seguenti dipendenze di rete per vedere se sono accessibili. Se gli indirizzi correlati non sono accessibili, causerà problemi di integrazione.\r\n- Indirizzo di Autenticazione OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Indirizzo API HTTP di Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Indirizzo API SPEC di Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Indirizzo del Broker MQTT di Xiaomi: `mqtts://{broker_host}`.",
|
"description": "## Introduzione all'uso\r\n### Indirizzo di Rilevamento della Rete\r\nUtilizzato per verificare se la rete funziona correttamente. Se non impostato, verrà utilizzato l'indirizzo di default del sistema. Se il controllo dell'indirizzo predefinito fallisce, puoi provare a inserire un indirizzo personalizzato.\r\n- Puoi inserire più indirizzi di rilevamento, separati da virgole, come `8.8.8.8,{bing_url}`\r\n- Se è un indirizzo IP, il rilevamento verrà eseguito tramite ping. Se è un indirizzo HTTP(s), il rilevamento verrà eseguito tramite richiesta HTTP GET.\r\n- Se desideri ripristinare l'indirizzo di rilevamento predefinito del sistema, inserisci una virgola `,` e fai clic su 'Avanti'.\r\n- **Questa configurazione è globale e le modifiche influenzeranno altre istanze di integrazione. Si prega di modificare con cautela.**\r\n### Controlla le Dipendenze di Rete\r\nControlla una per una le seguenti dipendenze di rete per vedere se sono accessibili. Se gli indirizzi correlati non sono accessibili, causerà problemi di integrazione.\r\n- Indirizzo di Autenticazione OAuth2: `{oauth2_auth_url}`.\r\n- Indirizzo API HTTP di Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Indirizzo API SPEC di Xiaomi: `{spec_api_url}`.\r\n- Indirizzo del Broker MQTT di Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Indirizzo di Rilevamento della Rete",
|
"network_detect_addr": "Indirizzo di Rilevamento della Rete",
|
||||||
"check_network_deps": "Controlla le Dipendenze di Rete"
|
"check_network_deps": "Controlla le Dipendenze di Rete"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configurazione dell'Autenticazione",
|
"title": "Configurazione dell'Autenticazione",
|
||||||
"description": "Le informazioni di autenticazione locale sono scadute. Si prega di riavviare il processo di autenticazione.\r\n### Regione di Login Corrente: {cloud_server}\r\n### URL di reindirizzamento OAuth2\r\nL'indirizzo di reindirizzamento dell'autenticazione OAuth2 è **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant deve trovarsi nella stessa rete locale del terminale operativo corrente (ad esempio, il computer personale) e il terminale operativo deve poter accedere alla home page di Home Assistant tramite questo indirizzo. Altrimenti, l'autenticazione del login potrebbe fallire.",
|
"description": "Le informazioni di autenticazione locale sono scadute. Si prega di riavviare il processo di autenticazione.\r\n### Regione di Login Corrente: {cloud_server}\r\n### URL di reindirizzamento OAuth2\r\nL'indirizzo di reindirizzamento dell'autenticazione OAuth2 è **[{oauth_redirect_url}]({oauth_redirect_url})**. Home Assistant deve trovarsi nella stessa rete locale del terminale operativo corrente (ad esempio, il computer personale) e il terminale operativo deve poter accedere alla home page di Home Assistant tramite questo indirizzo. Altrimenti, l'autenticazione del login potrebbe fallire.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "URL di reindirizzamento OAuth2"
|
"oauth_redirect_url": "URL di reindirizzamento OAuth2"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configurazione di Rete Integrata",
|
"title": "Configurazione di Rete Integrata",
|
||||||
"description": "## Introduzione all'uso\r\n### Indirizzo di Rilevamento della Rete\r\nUtilizzato per verificare se la rete funziona correttamente. Se non impostato, verrà utilizzato l'indirizzo di default del sistema. Se il controllo dell'indirizzo predefinito fallisce, puoi provare a inserire un indirizzo personalizzato.\r\n- Puoi inserire più indirizzi di rilevamento, separati da virgole, come `8.8.8.8,https://www.bing.com`\r\n- Se è un indirizzo IP, il rilevamento verrà eseguito tramite ping. Se è un indirizzo HTTP(s), il rilevamento verrà eseguito tramite richiesta HTTP GET.\r\n- Se desideri ripristinare l'indirizzo di rilevamento predefinito del sistema, inserisci una virgola `,` e fai clic su 'Avanti'.\r\n- **Questa configurazione è globale e le modifiche influenzeranno altre istanze di integrazione. Si prega di modificare con cautela.**\r\n### Controlla le Dipendenze di Rete\r\nControlla una per una le seguenti dipendenze di rete per vedere se sono accessibili. Se gli indirizzi correlati non sono accessibili, causerà problemi di integrazione.\r\n- Indirizzo di Autenticazione OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Indirizzo API HTTP di Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Indirizzo API SPEC di Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Indirizzo del Broker MQTT di Xiaomi: `mqtts://{broker_host}`.",
|
"description": "## Introduzione all'uso\r\n### Indirizzo di Rilevamento della Rete\r\nUtilizzato per verificare se la rete funziona correttamente. Se non impostato, verrà utilizzato l'indirizzo di default del sistema. Se il controllo dell'indirizzo predefinito fallisce, puoi provare a inserire un indirizzo personalizzato.\r\n- Puoi inserire più indirizzi di rilevamento, separati da virgole, come `8.8.8.8,{bing_url}`\r\n- Se è un indirizzo IP, il rilevamento verrà eseguito tramite ping. Se è un indirizzo HTTP(s), il rilevamento verrà eseguito tramite richiesta HTTP GET.\r\n- Se desideri ripristinare l'indirizzo di rilevamento predefinito del sistema, inserisci una virgola `,` e fai clic su 'Avanti'.\r\n- **Questa configurazione è globale e le modifiche influenzeranno altre istanze di integrazione. Si prega di modificare con cautela.**\r\n### Controlla le Dipendenze di Rete\r\nControlla una per una le seguenti dipendenze di rete per vedere se sono accessibili. Se gli indirizzi correlati non sono accessibili, causerà problemi di integrazione.\r\n- Indirizzo di Autenticazione OAuth2: `{oauth2_auth_url}`.\r\n- Indirizzo API HTTP di Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Indirizzo API SPEC di Xiaomi: `{spec_api_url}`.\r\n- Indirizzo del Broker MQTT di Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Indirizzo di Rilevamento della Rete",
|
"network_detect_addr": "Indirizzo di Rilevamento della Rete",
|
||||||
"check_network_deps": "Controlla le Dipendenze di Rete"
|
"check_network_deps": "Controlla le Dipendenze di Rete"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "基本設定",
|
"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ローカルネットワークが正常に機能しているかどうか、および関連するネットワークリソースにアクセスできるかどうかを確認します。**初めて追加する場合は、これを選択することをお勧めします。**\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 認証リダイレクトアドレスは **[{oauth_redirect_url}]({oauth_redirect_url})** です。Home Assistant は、現在の操作端末(たとえば、パーソナルコンピュータ)と同じ LAN 内にあり、操作端末がこのアドレスで Home Assistant ホームページにアクセスできる場合にのみログイン認証が成功する場合があります。\r\n### 統合ネットワーク構成\r\nローカルネットワークが正常に機能しているかどうか、および関連するネットワークリソースにアクセスできるかどうかを確認します。**初めて追加する場合は、これを選択することをお勧めします。**\r\n### 注意事項\r\n- 数百台以上のMi Homeデバイスをお持ちのユーザーの場合、統合の初回追加には時間がかかります。しばらくお待ちください。\r\n- Home AssistantがDocker環境で実行されている場合は、Dockerのネットワークモードがhostに設定されていることを確認してください。そうしないと、ローカル制御機能が正しく動作しない可能性があります。\r\n- 統合のローカル制御機能にはいくつかの依存関係があります。READMEを注意深く読んでください。",
|
||||||
"data": {
|
"data": {
|
||||||
"cloud_server": "ログインエリア",
|
"cloud_server": "ログインエリア",
|
||||||
"integration_language": "言語",
|
"integration_language": "言語",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "統合ネットワーク構成",
|
"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- システムのデフォルト検出アドレスを復元する場合は、カンマ `,` を入力して「次へ」をクリックしてください。\r\n- **この設定はグローバルであり、変更は他の統合インスタンスに影響を与えます。慎重に変更してください。**\r\n### ネットワーク依存関係のチェック\r\n次のネットワーク依存関係がアクセス可能かどうかを順番に確認します。関連するアドレスにアクセスできない場合、統合に問題が発生します。\r\n- OAuth2 認証アドレス: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API アドレス: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API アドレス: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT ブローカーアドレス: `mqtts://{broker_host}`.",
|
"description": "## 使用方法の紹介\r\n### ネットワーク検出アドレス\r\nネットワークが正常に機能しているかどうかを確認するために使用されます。設定されていない場合、システムのデフォルトアドレスが使用されます。デフォルトアドレスのチェックが失敗した場合は、カスタムアドレスを入力してみてください。\r\n- 複数の検出アドレスを入力できます。アドレスはコンマで区切ります。例:`8.8.8.8,{bing_url}`\r\n- IPアドレスの場合、pingによる検出が行われます。HTTP(s)アドレスの場合、HTTP GETリクエストによる検出が行われます。\r\n- システムのデフォルト検出アドレスを復元する場合は、カンマ `,` を入力して「次へ」をクリックしてください。\r\n- **この設定はグローバルであり、変更は他の統合インスタンスに影響を与えます。慎重に変更してください。**\r\n### ネットワーク依存関係のチェック\r\n次のネットワーク依存関係がアクセス可能かどうかを順番に確認します。関連するアドレスにアクセスできない場合、統合に問題が発生します。\r\n- OAuth2 認証アドレス: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API アドレス: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API アドレス: `{spec_api_url}`.\r\n- Xiaomi MQTT ブローカーアドレス: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "ネットワーク検出アドレス",
|
"network_detect_addr": "ネットワーク検出アドレス",
|
||||||
"check_network_deps": "ネットワーク依存関係のチェック"
|
"check_network_deps": "ネットワーク依存関係のチェック"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "認証構成",
|
"title": "認証構成",
|
||||||
"description": "ローカル認証情報が期限切れになっています。認証を再開してください。\r\n### 現在のログインエリア:{cloud_server}\r\n### OAuth2 認証リダイレクトアドレス\r\nOAuth2 認証リダイレクトアドレスは **[http://homeassistant.local:8123](http://homeassistant.local:8123)** です。Home Assistant は、現在の操作端末(たとえば、パーソナルコンピュータ)と同じ LAN 内にあり、操作端末がこのアドレスで Home Assistant ホームページにアクセスできる場合にのみログイン認証が成功する場合があります。",
|
"description": "ローカル認証情報が期限切れになっています。認証を再開してください。\r\n### 現在のログインエリア:{cloud_server}\r\n### OAuth2 認証リダイレクトアドレス\r\nOAuth2 認証リダイレクトアドレスは **[{oauth_redirect_url}]({oauth_redirect_url})** です。Home Assistant は、現在の操作端末(たとえば、パーソナルコンピュータ)と同じ LAN 内にあり、操作端末がこのアドレスで Home Assistant ホームページにアクセスできる場合にのみログイン認証が成功する場合があります。",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "認証リダイレクトアドレス"
|
"oauth_redirect_url": "認証リダイレクトアドレス"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "統合ネットワーク構成",
|
"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- システムのデフォルト検出アドレスを復元する場合は、カンマ `,` を入力して「次へ」をクリックしてください。\r\n- **この設定はグローバルであり、変更は他の統合インスタンスに影響を与えます。慎重に変更してください。**\r\n### ネットワーク依存関係のチェック\r\n次のネットワーク依存関係がアクセス可能かどうかを順番に確認します。関連するアドレスにアクセスできない場合、統合に問題が発生します。\r\n- OAuth2 認証アドレス: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API アドレス: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API アドレス: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT ブローカーアドレス: `mqtts://{broker_host}`.",
|
"description": "## 使用方法の紹介\r\n### ネットワーク検出アドレス\r\nネットワークが正常に機能しているかどうかを確認するために使用されます。設定されていない場合、システムのデフォルトアドレスが使用されます。デフォルトアドレスのチェックが失敗した場合は、カスタムアドレスを入力してみてください。\r\n- 複数の検出アドレスを入力できます。アドレスはコンマで区切ります。例:`8.8.8.8,{bing_url}`\r\n- IPアドレスの場合、pingによる検出が行われます。HTTP(s)アドレスの場合、HTTP GETリクエストによる検出が行われます。\r\n- システムのデフォルト検出アドレスを復元する場合は、カンマ `,` を入力して「次へ」をクリックしてください。\r\n- **この設定はグローバルであり、変更は他の統合インスタンスに影響を与えます。慎重に変更してください。**\r\n### ネットワーク依存関係のチェック\r\n次のネットワーク依存関係がアクセス可能かどうかを順番に確認します。関連するアドレスにアクセスできない場合、統合に問題が発生します。\r\n- OAuth2 認証アドレス: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API アドレス: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API アドレス: `{spec_api_url}`.\r\n- Xiaomi MQTT ブローカーアドレス: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "ネットワーク検出アドレス",
|
"network_detect_addr": "ネットワーク検出アドレス",
|
||||||
"check_network_deps": "ネットワーク依存関係のチェック"
|
"check_network_deps": "ネットワーク依存関係のチェック"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Basisconfiguratie",
|
"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### Geïntegreerde Netwerkconfiguratie\r\nControleer of het lokale netwerk correct functioneert en of de gerelateerde netwerkbronnen toegankelijk zijn. **Het wordt aanbevolen om dit te selecteren bij het eerste toevoegen.**\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 **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Geïntegreerde Netwerkconfiguratie\r\nControleer of het lokale netwerk correct functioneert en of de gerelateerde netwerkbronnen toegankelijk zijn. **Het wordt aanbevolen om dit te selecteren bij het eerste toevoegen.**\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": {
|
"data": {
|
||||||
"cloud_server": "Inlogregio",
|
"cloud_server": "Inlogregio",
|
||||||
"integration_language": "Taal",
|
"integration_language": "Taal",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Geïntegreerde Netwerkconfiguratie",
|
"title": "Geïntegreerde Netwerkconfiguratie",
|
||||||
"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- Als u het standaarddetectieadres van het systeem wilt herstellen, voert u een komma `,` in en klikt u op 'Volgende'.\r\n- **Deze configuratie is globaal en wijzigingen zullen andere integratie-instanties beïnvloeden. Wijzig met voorzichtigheid.**\r\n### Controleer Netwerkafhankelijkheden\r\nControleer een voor een de volgende netwerkafhankelijkheden om te zien of ze toegankelijk zijn. Als de gerelateerde adressen niet toegankelijk zijn, zal dit integratieproblemen veroorzaken.\r\n- OAuth2-authenticatieadres: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API-adres: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-adres: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker-adres: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Als u het standaarddetectieadres van het systeem wilt herstellen, voert u een komma `,` in en klikt u op 'Volgende'.\r\n- **Deze configuratie is globaal en wijzigingen zullen andere integratie-instanties beïnvloeden. Wijzig met voorzichtigheid.**\r\n### Controleer Netwerkafhankelijkheden\r\nControleer een voor een de volgende netwerkafhankelijkheden om te zien of ze toegankelijk zijn. Als de gerelateerde adressen niet toegankelijk zijn, zal dit integratieproblemen veroorzaken.\r\n- OAuth2-authenticatieadres: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API-adres: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-adres: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker-adres: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Netwerkdetectieadres",
|
"network_detect_addr": "Netwerkdetectieadres",
|
||||||
"check_network_deps": "Controleer Netwerkafhankelijkheden"
|
"check_network_deps": "Controleer Netwerkafhankelijkheden"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Authenticatieconfiguratie",
|
"title": "Authenticatieconfiguratie",
|
||||||
"description": "Lokale authenticatie-informatie is verlopen. Begin alstublieft het authenticatieproces opnieuw.\r\n### Huidige inlogregio: {cloud_server}\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.",
|
"description": "Lokale authenticatie-informatie is verlopen. Begin alstublieft het authenticatieproces opnieuw.\r\n### Huidige inlogregio: {cloud_server}\r\n### OAuth2 Omleidings-URL\r\nHet OAuth2 authenticatie omleidingsadres is **[{oauth_redirect_url}]({oauth_redirect_url})**. 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.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "OAuth2 Omleidings-URL"
|
"oauth_redirect_url": "OAuth2 Omleidings-URL"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Geïntegreerde Netwerkconfiguratie",
|
"title": "Geïntegreerde Netwerkconfiguratie",
|
||||||
"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- Als u het standaarddetectieadres van het systeem wilt herstellen, voert u een komma `,` in en klikt u op 'Volgende'.\r\n- **Deze configuratie is globaal en wijzigingen zullen andere integratie-instanties beïnvloeden. Wijzig met voorzichtigheid.**\r\n### Controleer Netwerkafhankelijkheden\r\nControleer een voor een de volgende netwerkafhankelijkheden om te zien of ze toegankelijk zijn. Als de gerelateerde adressen niet toegankelijk zijn, zal dit integratieproblemen veroorzaken.\r\n- OAuth2-authenticatieadres: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API-adres: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-adres: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker-adres: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Als u het standaarddetectieadres van het systeem wilt herstellen, voert u een komma `,` in en klikt u op 'Volgende'.\r\n- **Deze configuratie is globaal en wijzigingen zullen andere integratie-instanties beïnvloeden. Wijzig met voorzichtigheid.**\r\n### Controleer Netwerkafhankelijkheden\r\nControleer een voor een de volgende netwerkafhankelijkheden om te zien of ze toegankelijk zijn. Als de gerelateerde adressen niet toegankelijk zijn, zal dit integratieproblemen veroorzaken.\r\n- OAuth2-authenticatieadres: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API-adres: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API-adres: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker-adres: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Netwerkdetectieadres",
|
"network_detect_addr": "Netwerkdetectieadres",
|
||||||
"check_network_deps": "Controleer Netwerkafhankelijkheden"
|
"check_network_deps": "Controleer Netwerkafhankelijkheden"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuração básica",
|
"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### Configuração de Rede Integrada\r\nVerifique se a rede local está funcionando corretamente e se os recursos de rede relacionados estão acessíveis. **Recomenda-se selecionar isso ao adicionar pela primeira vez.**\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 é **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Configuração de Rede Integrada\r\nVerifique se a rede local está funcionando corretamente e se os recursos de rede relacionados estão acessíveis. **Recomenda-se selecionar isso ao adicionar pela primeira vez.**\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": {
|
"data": {
|
||||||
"cloud_server": "Região de Login",
|
"cloud_server": "Região de Login",
|
||||||
"integration_language": "Idioma",
|
"integration_language": "Idioma",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuração de Detecção de Rede",
|
"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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `{oauth2_auth_url}`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `{spec_api_url}`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Endereço de Detecção de Rede",
|
"network_detect_addr": "Endereço de Detecção de Rede",
|
||||||
"check_network_deps": "Verificar Dependências de Rede"
|
"check_network_deps": "Verificar Dependências de Rede"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuração de Autenticação",
|
"title": "Configuração de Autenticação",
|
||||||
"description": "As informações de autenticação local expiraram. Por favor, reinicie o processo de autenticação.\r\n### Região de Login Atual: {cloud_server}\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.",
|
"description": "As informações de autenticação local expiraram. Por favor, reinicie o processo de autenticação.\r\n### Região de Login Atual: {cloud_server}\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento da autenticação OAuth2 é **[{oauth_redirect_url}]({oauth_redirect_url})**. 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.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
|
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuração de Detecção de Rede",
|
"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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `{oauth2_auth_url}`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `{spec_api_url}`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Endereço de Detecção de Rede",
|
"network_detect_addr": "Endereço de Detecção de Rede",
|
||||||
"check_network_deps": "Verificar Dependências de Rede"
|
"check_network_deps": "Verificar Dependências de Rede"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuração Básica",
|
"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### Configuração de Rede Integrada\r\nVerifique se a rede local está funcionando corretamente e se os recursos de rede relacionados estão acessíveis. **Recomenda-se selecionar isso ao adicionar pela primeira vez.**\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 é **[{oauth_redirect_url}]({oauth_redirect_url})**. 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### Configuração de Rede Integrada\r\nVerifique se a rede local está funcionando corretamente e se os recursos de rede relacionados estão acessíveis. **Recomenda-se selecionar isso ao adicionar pela primeira vez.**\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": {
|
"data": {
|
||||||
"cloud_server": "Região de Login",
|
"cloud_server": "Região de Login",
|
||||||
"integration_language": "Idioma",
|
"integration_language": "Idioma",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuração de Rede Integrada",
|
"title": "Configuração de Rede Integrada",
|
||||||
"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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `{oauth2_auth_url}`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `{spec_api_url}`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Endereço de Detecção de Rede",
|
"network_detect_addr": "Endereço de Detecção de Rede",
|
||||||
"check_network_deps": "Verificar Dependências de Rede"
|
"check_network_deps": "Verificar Dependências de Rede"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Configuração de Autenticação",
|
"title": "Configuração de Autenticação",
|
||||||
"description": "A informação de autenticação local expirou. Por favor, reinicie o processo de autenticação.\r\n### Região de Login Atual: {cloud_server}\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) e esse terminal deve conseguir aceder à página inicial do Home Assistant através deste endereço. Caso contrário, a autenticação poderá falhar.",
|
"description": "A informação de autenticação local expirou. Por favor, reinicie o processo de autenticação.\r\n### Região de Login Atual: {cloud_server}\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento para a autenticação OAuth2 é **[{oauth_redirect_url}]({oauth_redirect_url})**. O Home Assistant deve estar na mesma rede local que o terminal atual (por exemplo, o computador) e esse terminal deve conseguir aceder à página inicial do Home Assistant através deste endereço. Caso contrário, a autenticação poderá falhar.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
|
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Configuração de Rede Integrada",
|
"title": "Configuração de Rede Integrada",
|
||||||
"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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
"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,{bing_url}`\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- Se você deseja restaurar o endereço de detecção padrão do sistema, insira uma vírgula `,` e clique em 'Próximo'.\r\n- **Esta configuração é global e as alterações afetarão outras instâncias de integração. Modifique com cautela.**\r\n### Verificar Dependências de Rede\r\nVerifique uma por uma as seguintes dependências de rede para ver se são acessíveis. Se os endereços relacionados não forem acessíveis, isso causará problemas de integração.\r\n- Endereço de Autenticação OAuth2: `{oauth2_auth_url}`.\r\n- Endereço da API HTTP da Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Endereço da API SPEC da Xiaomi: `{spec_api_url}`.\r\n- Endereço do Broker MQTT da Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Endereço de Detecção de Rede",
|
"network_detect_addr": "Endereço de Detecção de Rede",
|
||||||
"check_network_deps": "Verificar Dependências de Rede"
|
"check_network_deps": "Verificar Dependências de Rede"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Интегрированная Сетевая Конфигурация",
|
"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- Если вы хотите восстановить адрес обнаружения по умолчанию, введите запятую `,` и нажмите 'Далее'.\r\n- **Эта конфигурация является глобальной, и изменения повлияют на другие экземпляры интеграции. Пожалуйста, изменяйте с осторожностью.**\r\n### Проверка Сетевых Зависимостей\r\nПроверьте поочередно следующие сетевые зависимости, чтобы убедиться, что они доступны. Если соответствующие адреса недоступны, это приведет к проблемам с интеграцией.\r\n- Адрес аутентификации OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Адрес HTTP API Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Адрес SPEC API Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Адрес MQTT брокера Xiaomi: `mqtts://{broker_host}`.",
|
"description": "## Введение в Использование\r\n### Адрес Обнаружения Сети\r\nИспользуется для проверки работоспособности сети. Если не задано, будет использоваться адрес по умолчанию. Если проверка адреса по умолчанию не удалась, вы можете попробовать ввести пользовательский адрес.\r\n- Вы можете ввести несколько адресов для проверки, разделенных запятыми, например `8.8.8.8,{bing_url}`\r\n- Если это IP-адрес, проверка будет выполняться с помощью ping. Если это HTTP(s)-адрес, проверка будет выполняться с помощью HTTP GET запроса.\r\n- Если вы хотите восстановить адрес обнаружения по умолчанию, введите запятую `,` и нажмите 'Далее'.\r\n- **Эта конфигурация является глобальной, и изменения повлияют на другие экземпляры интеграции. Пожалуйста, изменяйте с осторожностью.**\r\n### Проверка Сетевых Зависимостей\r\nПроверьте поочередно следующие сетевые зависимости, чтобы убедиться, что они доступны. Если соответствующие адреса недоступны, это приведет к проблемам с интеграцией.\r\n- Адрес аутентификации OAuth2: `{oauth2_auth_url}`.\r\n- Адрес HTTP API Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Адрес SPEC API Xiaomi: `{spec_api_url}`.\r\n- Адрес MQTT брокера Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Адрес Обнаружения Сети",
|
"network_detect_addr": "Адрес Обнаружения Сети",
|
||||||
"check_network_deps": "Проверка Сетевых Зависимостей"
|
"check_network_deps": "Проверка Сетевых Зависимостей"
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Интегрированная Сетевая Конфигурация",
|
"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- Если вы хотите восстановить адрес обнаружения по умолчанию, введите запятую `,` и нажмите 'Далее'.\r\n- **Эта конфигурация является глобальной, и изменения повлияют на другие экземпляры интеграции. Пожалуйста, изменяйте с осторожностью.**\r\n### Проверка Сетевых Зависимостей\r\nПроверьте поочередно следующие сетевые зависимости, чтобы убедиться, что они доступны. Если соответствующие адреса недоступны, это приведет к проблемам с интеграцией.\r\n- Адрес аутентификации OAuth2: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Адрес HTTP API Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Адрес SPEC API Xiaomi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Адрес MQTT брокера Xiaomi: `mqtts://{broker_host}`.",
|
"description": "## Введение в Использование\r\n### Адрес Обнаружения Сети\r\nИспользуется для проверки работоспособности сети. Если не задано, будет использоваться адрес по умолчанию. Если проверка адреса по умолчанию не удалась, вы можете попробовать ввести пользовательский адрес.\r\n- Вы можете ввести несколько адресов для проверки, разделенных запятыми, например `8.8.8.8,{bing_url}`\r\n- Если это IP-адрес, проверка будет выполняться с помощью ping. Если это HTTP(s)-адрес, проверка будет выполняться с помощью HTTP GET запроса.\r\n- Если вы хотите восстановить адрес обнаружения по умолчанию, введите запятую `,` и нажмите 'Далее'.\r\n- **Эта конфигурация является глобальной, и изменения повлияют на другие экземпляры интеграции. Пожалуйста, изменяйте с осторожностью.**\r\n### Проверка Сетевых Зависимостей\r\nПроверьте поочередно следующие сетевые зависимости, чтобы убедиться, что они доступны. Если соответствующие адреса недоступны, это приведет к проблемам с интеграцией.\r\n- Адрес аутентификации OAuth2: `{oauth2_auth_url}`.\r\n- Адрес HTTP API Xiaomi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Адрес SPEC API Xiaomi: `{spec_api_url}`.\r\n- Адрес MQTT брокера Xiaomi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Адрес Обнаружения Сети",
|
"network_detect_addr": "Адрес Обнаружения Сети",
|
||||||
"check_network_deps": "Проверка Сетевых Зависимостей"
|
"check_network_deps": "Проверка Сетевых Зависимостей"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Temel yapılandırma",
|
"title": "Temel yapılandırma",
|
||||||
"description": "### Giriş Bölgesi\r\nXiaomi hesabınızın bölgesini seçin. Bunu Xiaomi Home UYGULAMASI > Profil (alttaki menüde bulunur) > Ek ayarlar > Xiaomi Home Hakkında bölümünde bulabilirsiniz.\r\n### Dil\r\nCihaz ve varlık adlarının dilini seçin. Çevirisi olmayan bazı cümleler İngilizce olarak görüntülenecektir.\r\n### OAuth2 Yönlendirme URL'si\r\nOAuth2 kimlik doğrulama yönlendirme adresi **[http://homeassistant.local:8123](http://homeassistant.local:8123)** şeklindedir. Home Assistant'ın mevcut işletim terminali (örn. kişisel bilgisayar) ile aynı yerel ağda olması ve işletim terminalinin bu adres üzerinden Home Assistant ana sayfasına erişebilmesi gerekir. Aksi takdirde giriş kimlik doğrulaması başarısız olabilir.\r\n### Entegre Ağ Yapılandırması\r\nYerel ağın düzgün çalışıp çalışmadığını ve ilgili ağ kaynaklarının erişilebilir olup olmadığını kontrol edin. **İlk kez eklerken bunu seçmeniz önerilir.**\r\n### Not\r\n- Yüzlerce veya daha fazla Mi Home cihazına sahip kullanıcılar için, entegrasyonun ilk eklenmesi biraz zaman alacaktır. Lütfen sabırlı olun.\r\n- Home Assistant bir Docker ortamında çalışıyorsa, lütfen Docker ağ modunun host olarak ayarlandığından emin olun, aksi takdirde yerel kontrol işlevi düzgün çalışmayabilir.\r\n- Entegrasyonun yerel kontrol işlevinin bazı bağımlılıkları vardır. Lütfen README'yi dikkatlice okuyun.",
|
"description": "### Giriş Bölgesi\r\nXiaomi hesabınızın bölgesini seçin. Bunu Xiaomi Home UYGULAMASI > Profil (alttaki menüde bulunur) > Ek ayarlar > Xiaomi Home Hakkında bölümünde bulabilirsiniz.\r\n### Dil\r\nCihaz ve varlık adlarının dilini seçin. Çevirisi olmayan bazı cümleler İngilizce olarak görüntülenecektir.\r\n### OAuth2 Yönlendirme URL'si\r\nOAuth2 kimlik doğrulama yönlendirme adresi **[{oauth_redirect_url}]({oauth_redirect_url})** şeklindedir. Home Assistant'ın mevcut işletim terminali (örn. kişisel bilgisayar) ile aynı yerel ağda olması ve işletim terminalinin bu adres üzerinden Home Assistant ana sayfasına erişebilmesi gerekir. Aksi takdirde giriş kimlik doğrulaması başarısız olabilir.\r\n### Entegre Ağ Yapılandırması\r\nYerel ağın düzgün çalışıp çalışmadığını ve ilgili ağ kaynaklarının erişilebilir olup olmadığını kontrol edin. **İlk kez eklerken bunu seçmeniz önerilir.**\r\n### Not\r\n- Yüzlerce veya daha fazla Mi Home cihazına sahip kullanıcılar için, entegrasyonun ilk eklenmesi biraz zaman alacaktır. Lütfen sabırlı olun.\r\n- Home Assistant bir Docker ortamında çalışıyorsa, lütfen Docker ağ modunun host olarak ayarlandığından emin olun, aksi takdirde yerel kontrol işlevi düzgün çalışmayabilir.\r\n- Entegrasyonun yerel kontrol işlevinin bazı bağımlılıkları vardır. Lütfen README'yi dikkatlice okuyun.",
|
||||||
"data": {
|
"data": {
|
||||||
"cloud_server": "Giriş Bölgesi",
|
"cloud_server": "Giriş Bölgesi",
|
||||||
"integration_language": "Dil",
|
"integration_language": "Dil",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Entegre Ağ Yapılandırması",
|
"title": "Entegre Ağ Yapılandırması",
|
||||||
"description": "## Kullanım Tanıtımı\r\n### Ağ Algılama Adresi\r\nAğın düzgün çalışıp çalışmadığını kontrol etmek için kullanılır. Ayarlanmazsa, sistem varsayılan adresi kullanılacaktır. Varsayılan adres kontrolü başarısız olursa, özel bir adres girmeyi deneyebilirsiniz.\r\n- Virgülle ayrılmış birden fazla algılama adresi girebilirsiniz, örneğin `8.8.8.8,https://www.bing.com`\r\n- Bir IP adresi ise, algılama ping üzerinden yapılacaktır. Bir HTTP(s) adresi ise, algılama HTTP GET isteği üzerinden yapılacaktır.\r\n- Sistem varsayılan algılama adresini geri yüklemek istiyorsanız, lütfen bir virgül `,` girin ve 'İleri'ye tıklayın.\r\n- **Bu yapılandırma geneldir ve değişiklikler diğer entegrasyon örneklerini etkileyecektir. Lütfen dikkatli değiştirin.**\r\n### Ağ Bağımlılıklarını Kontrol Et\r\nAşağıdaki ağ bağımlılıklarının erişilebilir olup olmadığını tek tek kontrol edin. İlgili adresler erişilebilir değilse, entegrasyon sorunlarına neden olacaktır.\r\n- OAuth2 Kimlik Doğrulama Adresi: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API Adresi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Adresi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker Adresi: `mqtts://{broker_host}`.",
|
"description": "## Kullanım Tanıtımı\r\n### Ağ Algılama Adresi\r\nAğın düzgün çalışıp çalışmadığını kontrol etmek için kullanılır. Ayarlanmazsa, sistem varsayılan adresi kullanılacaktır. Varsayılan adres kontrolü başarısız olursa, özel bir adres girmeyi deneyebilirsiniz.\r\n- Virgülle ayrılmış birden fazla algılama adresi girebilirsiniz, örneğin `8.8.8.8,{bing_url}`\r\n- Bir IP adresi ise, algılama ping üzerinden yapılacaktır. Bir HTTP(s) adresi ise, algılama HTTP GET isteği üzerinden yapılacaktır.\r\n- Sistem varsayılan algılama adresini geri yüklemek istiyorsanız, lütfen bir virgül `,` girin ve 'İleri'ye tıklayın.\r\n- **Bu yapılandırma geneldir ve değişiklikler diğer entegrasyon örneklerini etkileyecektir. Lütfen dikkatli değiştirin.**\r\n### Ağ Bağımlılıklarını Kontrol Et\r\nAşağıdaki ağ bağımlılıklarının erişilebilir olup olmadığını tek tek kontrol edin. İlgili adresler erişilebilir değilse, entegrasyon sorunlarına neden olacaktır.\r\n- OAuth2 Kimlik Doğrulama Adresi: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API Adresi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Adresi: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker Adresi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Ağ Algılama Adresi",
|
"network_detect_addr": "Ağ Algılama Adresi",
|
||||||
"check_network_deps": "Ağ Bağımlılıklarını Kontrol Et"
|
"check_network_deps": "Ağ Bağımlılıklarını Kontrol Et"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "Kimlik Doğrulama Yapılandırması",
|
"title": "Kimlik Doğrulama Yapılandırması",
|
||||||
"description": "Yerel kimlik doğrulama bilgileri süresi doldu. Lütfen kimlik doğrulama işlemini yeniden başlatın.\r\n### Geçerli Giriş Bölgesi: {cloud_server}\r\n### OAuth2 Yönlendirme URL'si\r\nOAuth2 kimlik doğrulama yönlendirme adresi **[http://homeassistant.local:8123](http://homeassistant.local:8123)** şeklindedir. Home Assistant'ın mevcut işletim terminali (örn. kişisel bilgisayar) ile aynı yerel ağda olması ve işletim terminalinin bu adres üzerinden Home Assistant ana sayfasına erişebilmesi gerekir. Aksi takdirde giriş kimlik doğrulaması başarısız olabilir.",
|
"description": "Yerel kimlik doğrulama bilgileri süresi doldu. Lütfen kimlik doğrulama işlemini yeniden başlatın.\r\n### Geçerli Giriş Bölgesi: {cloud_server}\r\n### OAuth2 Yönlendirme URL'si\r\nOAuth2 kimlik doğrulama yönlendirme adresi **[{oauth_redirect_url}]({oauth_redirect_url})** şeklindedir. Home Assistant'ın mevcut işletim terminali (örn. kişisel bilgisayar) ile aynı yerel ağda olması ve işletim terminalinin bu adres üzerinden Home Assistant ana sayfasına erişebilmesi gerekir. Aksi takdirde giriş kimlik doğrulaması başarısız olabilir.",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "OAuth2 Yönlendirme URL'si"
|
"oauth_redirect_url": "OAuth2 Yönlendirme URL'si"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "Entegre Ağ Yapılandırması",
|
"title": "Entegre Ağ Yapılandırması",
|
||||||
"description": "## Kullanım Tanıtımı\r\n### Ağ Algılama Adresi\r\nAğın düzgün çalışıp çalışmadığını kontrol etmek için kullanılır. Ayarlanmazsa, sistem varsayılan adresi kullanılacaktır. Varsayılan adres kontrolü başarısız olursa, özel bir adres girmeyi deneyebilirsiniz.\r\n- Virgülle ayrılmış birden fazla algılama adresi girebilirsiniz, örneğin `8.8.8.8,https://www.bing.com`\r\n- Bir IP adresi ise, algılama ping üzerinden yapılacaktır. Bir HTTP(s) adresi ise, algılama HTTP GET isteği üzerinden yapılacaktır.\r\n- Sistem varsayılan algılama adresini geri yüklemek istiyorsanız, lütfen bir virgül `,` girin ve 'İleri'ye tıklayın.\r\n- **Bu yapılandırma geneldir ve değişiklikler diğer entegrasyon örneklerini etkileyecektir. Lütfen dikkatli değiştirin.**\r\n### Ağ Bağımlılıklarını Kontrol Et\r\nAşağıdaki ağ bağımlılıklarının erişilebilir olup olmadığını tek tek kontrol edin. İlgili adresler erişilebilir değilse, entegrasyon sorunlarına neden olacaktır.\r\n- OAuth2 Kimlik Doğrulama Adresi: `https://account.xiaomi.com/oauth2/authorize`.\r\n- Xiaomi HTTP API Adresi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Adresi: `https://miot-spec.org/miot-spec-v2/template/list/device`.\r\n- Xiaomi MQTT Broker Adresi: `mqtts://{broker_host}`.",
|
"description": "## Kullanım Tanıtımı\r\n### Ağ Algılama Adresi\r\nAğın düzgün çalışıp çalışmadığını kontrol etmek için kullanılır. Ayarlanmazsa, sistem varsayılan adresi kullanılacaktır. Varsayılan adres kontrolü başarısız olursa, özel bir adres girmeyi deneyebilirsiniz.\r\n- Virgülle ayrılmış birden fazla algılama adresi girebilirsiniz, örneğin `8.8.8.8,{bing_url}`\r\n- Bir IP adresi ise, algılama ping üzerinden yapılacaktır. Bir HTTP(s) adresi ise, algılama HTTP GET isteği üzerinden yapılacaktır.\r\n- Sistem varsayılan algılama adresini geri yüklemek istiyorsanız, lütfen bir virgül `,` girin ve 'İleri'ye tıklayın.\r\n- **Bu yapılandırma geneldir ve değişiklikler diğer entegrasyon örneklerini etkileyecektir. Lütfen dikkatli değiştirin.**\r\n### Ağ Bağımlılıklarını Kontrol Et\r\nAşağıdaki ağ bağımlılıklarının erişilebilir olup olmadığını tek tek kontrol edin. İlgili adresler erişilebilir değilse, entegrasyon sorunlarına neden olacaktır.\r\n- OAuth2 Kimlik Doğrulama Adresi: `{oauth2_auth_url}`.\r\n- Xiaomi HTTP API Adresi: `https://{http_host}/app/v2/ha/oauth/get_token`.\r\n- Xiaomi SPEC API Adresi: `{spec_api_url}`.\r\n- Xiaomi MQTT Broker Adresi: `mqtts://{broker_host}`.",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "Ağ Algılama Adresi",
|
"network_detect_addr": "Ağ Algılama Adresi",
|
||||||
"check_network_deps": "Ağ Bağımlılıklarını Kontrol Et"
|
"check_network_deps": "Ağ Bağımlılıklarını Kontrol Et"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "基础配置",
|
"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### 注意事项\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 认证跳转地址为 **[{oauth_redirect_url}]({oauth_redirect_url})**,Home Assistant 需要与当前操作终端(例如,个人电脑)在同一局域网内,且操作终端能通过该地址访问 Home Assistant 首页,否则登录认证可能会失败。\r\n### 集成网络配置\r\n检测本地网络是否正常,相关网络资源是否可访问。**首次添加时建议勾选。**\r\n### 注意事项\r\n- 对于数百个及以上米家设备的用户,首次添加集成会耗费一些时间,请耐心等待。\r\n- 如果 Home Assistant 运行在docker环境下,请确保docker网络模式为host,否则会导致本地控制功能异常。\r\n- 集成本地控制功能存在一些依赖项,请仔细阅读README。",
|
||||||
"data": {
|
"data": {
|
||||||
"cloud_server": "登录地区",
|
"cloud_server": "登录地区",
|
||||||
"integration_language": "语言",
|
"integration_language": "语言",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "网络检测配置",
|
"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- 如果想恢复系统默认检测地址,请输入`,`号,然后点击'下一步'。\r\n- **该配置为全局配置,修改会影响其它集成实例的网络检测,请谨慎修改。**\r\n### 检测网络依赖项\r\n依次检查下述网络依赖项是否可访问。如果相关地址无法访问,将会导致集成异常。\r\n- OAuth2 认证地址:`https://account.xiaomi.com/oauth2/authorize`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`https://miot-spec.org/miot-spec-v2/template/list/device`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
"description": "## 使用介绍\r\n### 网络检测地址\r\n用于检测网络是否正常,未设置时将使用系统默认地址检测。如果默认地址检测异常时,可尝试输入可用的自定义地址检测。\r\n- 可输入多个检测地址,地址之间使用`,`号间隔,如`8.8.8.8,{bing_url}`\r\n- 如果为IP地址,将采用ping方式检测,如果为http(s)地址,将采用 HTTP GET 访问该地址检测。\r\n- 如果想恢复系统默认检测地址,请输入`,`号,然后点击'下一步'。\r\n- **该配置为全局配置,修改会影响其它集成实例的网络检测,请谨慎修改。**\r\n### 检测网络依赖项\r\n依次检查下述网络依赖项是否可访问。如果相关地址无法访问,将会导致集成异常。\r\n- OAuth2 认证地址:`{oauth2_auth_url}`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`{spec_api_url}`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "网络检测地址",
|
"network_detect_addr": "网络检测地址",
|
||||||
"check_network_deps": "检测网络依赖项"
|
"check_network_deps": "检测网络依赖项"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "认证配置",
|
"title": "认证配置",
|
||||||
"description": "检测到本地认证信息过期,请重新开始认证\r\n### 当前登录地区: {cloud_server}\r\n### OAuth2 认证跳转地址\r\nOAuth2 认证跳转地址为 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**,Home Assistant 需要与当前操作终端(例如,个人电脑)在同一局域网内,且操作终端能通过该地址访问 Home Assistant 首页,否则登录认证可能会失败。",
|
"description": "检测到本地认证信息过期,请重新开始认证\r\n### 当前登录地区: {cloud_server}\r\n### OAuth2 认证跳转地址\r\nOAuth2 认证跳转地址为 **[{oauth_redirect_url}]({oauth_redirect_url})**,Home Assistant 需要与当前操作终端(例如,个人电脑)在同一局域网内,且操作终端能通过该地址访问 Home Assistant 首页,否则登录认证可能会失败。",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "认证跳转地址"
|
"oauth_redirect_url": "认证跳转地址"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "网络检测配置",
|
"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- 如果想恢复系统默认检测地址,请输入`,`号,然后点击'下一步'。\r\n- **该配置为全局配置,修改会影响其它集成实例的网络检测,请谨慎修改。**\r\n### 检测网络依赖项\r\n依次检查下述网络依赖项是否可访问。如果相关地址无法访问,将会导致集成异常。\r\n- OAuth2 认证地址:`https://account.xiaomi.com/oauth2/authorize`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`https://miot-spec.org/miot-spec-v2/template/list/device`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
"description": "## 使用介绍\r\n### 网络检测地址\r\n用于检测网络是否正常,未设置时将使用系统默认地址检测。如果默认地址检测异常时,可尝试输入可用的自定义地址检测。\r\n- 可输入多个检测地址,地址之间使用`,`号间隔,如`8.8.8.8,{bing_url}`\r\n- 如果为IP地址,将采用ping方式检测,如果为http(s)地址,将采用 HTTP GET 访问该地址检测。\r\n- 如果想恢复系统默认检测地址,请输入`,`号,然后点击'下一步'。\r\n- **该配置为全局配置,修改会影响其它集成实例的网络检测,请谨慎修改。**\r\n### 检测网络依赖项\r\n依次检查下述网络依赖项是否可访问。如果相关地址无法访问,将会导致集成异常。\r\n- OAuth2 认证地址:`{oauth2_auth_url}`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`{spec_api_url}`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "网络检测地址",
|
"network_detect_addr": "网络检测地址",
|
||||||
"check_network_deps": "检测网络依赖项"
|
"check_network_deps": "检测网络依赖项"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "基礎配置",
|
"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### 注意事項\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 認證跳轉地址為 **[{oauth_redirect_url}]({oauth_redirect_url})**,Home Assistant 需要與當前操作終端(例如,個人電腦)在同一局域網內,且操作終端能通過該地址訪問 Home Assistant 首頁,否則登錄認證可能會失敗。\r\n### 集成網絡配置\r\n檢測本地網絡是否正常,相關網絡資源是否可訪問。**首次添加時建議勾選。**\r\n### 注意事項\r\n- 對於數百個及以上米家設備的用戶,首次添加集成會耗費一些時間,請耐心等待。\r\n- 如果 Home Assistant 運行在docker環境下,請確保docker網絡模式為host,否則會導致本地控制功能異常。\r\n- 集成本地控制功能存在一些依賴項,請仔細閱讀README。",
|
||||||
"data": {
|
"data": {
|
||||||
"cloud_server": "登錄地區",
|
"cloud_server": "登錄地區",
|
||||||
"integration_language": "語言",
|
"integration_language": "語言",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "集成網絡配置",
|
"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- 如果想恢復系統默認檢測地址,請輸入`,`號,然後點擊'下一步'。\r\n- **該配置為全局配置,修改會影響其它集成實例的網絡檢測,請謹慎修改。**\r\n### 檢測網絡依賴項\r\n依次檢查下述網絡依賴項是否可訪問。如果相關地址無法訪問,將會導致集成異常。\r\n- OAuth2 認證地址:`https://account.xiaomi.com/oauth2/authorize`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`https://miot-spec.org/miot-spec-v2/template/list/device`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
"description": "## 使用介紹\r\n### 網絡檢測地址\r\n用於檢測網絡是否正常,未設置時將使用系統默認地址檢測。如果默認地址檢測異常時,可嘗試輸入可用的自定義地址檢測。\r\n- 可輸入多個檢測地址,地址之間使用`,`號間隔,如`8.8.8.8,{bing_url}`\r\n- 如果為IP地址,將採用ping方式檢測,如果為http(s)地址,將採用 HTTP GET 訪問該地址檢測。\r\n- 如果想恢復系統默認檢測地址,請輸入`,`號,然後點擊'下一步'。\r\n- **該配置為全局配置,修改會影響其它集成實例的網絡檢測,請謹慎修改。**\r\n### 檢測網絡依賴項\r\n依次檢查下述網絡依賴項是否可訪問。如果相關地址無法訪問,將會導致集成異常。\r\n- OAuth2 認證地址:`{oauth2_auth_url}`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`{spec_api_url}`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "網絡檢測地址",
|
"network_detect_addr": "網絡檢測地址",
|
||||||
"check_network_deps": "檢測網絡依賴項"
|
"check_network_deps": "檢測網絡依賴項"
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
"step": {
|
"step": {
|
||||||
"auth_config": {
|
"auth_config": {
|
||||||
"title": "認證配置",
|
"title": "認證配置",
|
||||||
"description": "檢測到本地認證信息過期,請重新開始認證\r\n### 當前登錄地區: {cloud_server}\r\n### OAuth2 認證跳轉地址\r\nOAuth2 認證跳轉地址為 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**,Home Assistant 需要與當前操作終端(例如,個人電腦)在同一局域網內,且操作終端能通過該地址訪問 Home Assistant 首頁,否則登錄認證可能會失敗。",
|
"description": "檢測到本地認證信息過期,請重新開始認證\r\n### 當前登錄地區: {cloud_server}\r\n### OAuth2 認證跳轉地址\r\nOAuth2 認證跳轉地址為 **[{oauth_redirect_url}]({oauth_redirect_url})**,Home Assistant 需要與當前操作終端(例如,個人電腦)在同一局域網內,且操作終端能通過該地址訪問 Home Assistant 首頁,否則登錄認證可能會失敗。",
|
||||||
"data": {
|
"data": {
|
||||||
"oauth_redirect_url": "認證跳轉地址"
|
"oauth_redirect_url": "認證跳轉地址"
|
||||||
}
|
}
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
},
|
},
|
||||||
"network_detect_config": {
|
"network_detect_config": {
|
||||||
"title": "集成網絡配置",
|
"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- 如果想恢復系統默認檢測地址,請輸入`,`號,然後點擊'下一步'。\r\n- **該配置為全局配置,修改會影響其它集成實例的網絡檢測,請謹慎修改。**\r\n### 檢測網絡依賴項\r\n依次檢查下述網絡依賴項是否可訪問。如果相關地址無法訪問,將會導致集成異常。\r\n- OAuth2 認證地址:`https://account.xiaomi.com/oauth2/authorize`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`https://miot-spec.org/miot-spec-v2/template/list/device`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
"description": "## 使用介紹\r\n### 網絡檢測地址\r\n用於檢測網絡是否正常,未設置時將使用系統默認地址檢測。如果默認地址檢測異常時,可嘗試輸入可用的自定義地址檢測。\r\n- 可輸入多個檢測地址,地址之間使用`,`號間隔,如`8.8.8.8,{bing_url}`\r\n- 如果為IP地址,將採用ping方式檢測,如果為http(s)地址,將採用 HTTP GET 訪問該地址檢測。\r\n- 如果想恢復系統默認檢測地址,請輸入`,`號,然後點擊'下一步'。\r\n- **該配置為全局配置,修改會影響其它集成實例的網絡檢測,請謹慎修改。**\r\n### 檢測網絡依賴項\r\n依次檢查下述網絡依賴項是否可訪問。如果相關地址無法訪問,將會導致集成異常。\r\n- OAuth2 認證地址:`{oauth2_auth_url}`。\r\n- 小米 HTTP API 地址:`https://{http_host}/app/v2/ha/oauth/get_token`。\r\n- 小米 SPEC API 地址:`{spec_api_url}`。\r\n- 小米 MQTT Broker 地址:`mqtts://{broker_host}`。",
|
||||||
"data": {
|
"data": {
|
||||||
"network_detect_addr": "網絡檢測地址",
|
"network_detect_addr": "網絡檢測地址",
|
||||||
"check_network_deps": "檢測網絡依賴項"
|
"check_network_deps": "檢測網絡依賴項"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import logging
|
|||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
import pytest
|
import pytest
|
||||||
from os import path, makedirs
|
from os import path, makedirs, remove
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
TEST_ROOT_PATH: str = path.dirname(path.abspath(__file__))
|
TEST_ROOT_PATH: str = path.dirname(path.abspath(__file__))
|
||||||
@@ -57,6 +57,12 @@ def load_py_file():
|
|||||||
file_name),
|
file_name),
|
||||||
path.join(TEST_FILES_PATH, file_name))
|
path.join(TEST_FILES_PATH, file_name))
|
||||||
_LOGGER.info('\nloaded test py files, %s', file_list)
|
_LOGGER.info('\nloaded test py files, %s', file_list)
|
||||||
|
# Copy manifest.json to test folder (parent of miot/)
|
||||||
|
shutil.copyfile(
|
||||||
|
path.join(
|
||||||
|
TEST_ROOT_PATH, '../custom_components/xiaomi_home/manifest.json'),
|
||||||
|
path.join(TEST_ROOT_PATH, 'manifest.json'))
|
||||||
|
_LOGGER.info('loaded manifest.json')
|
||||||
# Copy spec files to test folder
|
# Copy spec files to test folder
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
src=path.join(
|
src=path.join(
|
||||||
@@ -89,6 +95,11 @@ def load_py_file():
|
|||||||
shutil.rmtree(TEST_FILES_PATH)
|
shutil.rmtree(TEST_FILES_PATH)
|
||||||
print('\nremoved test files, ', TEST_FILES_PATH)
|
print('\nremoved test files, ', TEST_FILES_PATH)
|
||||||
|
|
||||||
|
manifest_path = path.join(TEST_ROOT_PATH, 'manifest.json')
|
||||||
|
if path.exists(manifest_path):
|
||||||
|
remove(manifest_path)
|
||||||
|
print('removed test manifest.json, ', manifest_path)
|
||||||
|
|
||||||
if path.exists(TEST_CACHE_PATH):
|
if path.exists(TEST_CACHE_PATH):
|
||||||
shutil.rmtree(TEST_CACHE_PATH)
|
shutil.rmtree(TEST_CACHE_PATH)
|
||||||
print('removed test cache, ', TEST_CACHE_PATH)
|
print('removed test cache, ', TEST_CACHE_PATH)
|
||||||
|
|||||||
Reference in New Issue
Block a user