61 Commits

Author SHA1 Message Date
Li Shuzhen
75b3acb632 docs: update changelog and version to v0.5.0 (#1807)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2026-09-28 14:38:38 +08:00
Li Shuzhen
2056fef04d fix: specs (#1805)
* fix: aupu.bhf_light.qa3s fan-level value-list (#1765)

* fix: hey.relay.h100 power-consumption and electric-current properties (#1770)

* fix: xiaomi.bhf_light.na2 fan-level (#1741)

* fix: rw02.fan.rw001 fan-level (#1711)

* fix: cykj.hood.jyj22 fan-level (#1709)

* fix: daikin.aircondition.k5 mode and fan-level (#1717)

* fix: xiaomi.aircondition.m4 humidity-range unit (#1685)
2026-09-28 14:09:07 +08:00
Li Shuzhen
7201cf2277 feat: add user-agent (#1804) 2026-09-28 13:59:57 +08:00
Necroneco
a253918896 fix: replace deprecated CONCENTRATION_* unit constants (#1801) 2026-09-28 12:04:51 +08:00
zealllot
bf38d93068 fix(mips): return None instead of raising when getDevList times out (#1793)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
`MipsLocalClient.get_dev_list_async()` raises `MIoTMipsError` when the
central hub gateway does not answer in time, but both of its callers in
`miot_client.py` are written to handle a `None` return:

    gw_list = await mips.get_dev_list_async(payload=json.dumps(payload))
    if gw_list is None:
        ...
        return

Because the coroutine raises instead, those `None` branches are dead code
and the exception escapes as an unretrieved task exception.

The consequence is severe for `__refresh_gw_devices_with_group_id_async()`,
which is the only place that populates `_device_list_gateway` in full (it
runs when the local mips connection comes up, and queries every device with
no `filter`). One unreachable device is enough to time out the whole query,
and when it does:

  - `_device_list_gateway` stays empty, so every device keeps `gw_state`
    False;
  - the retry in the `gw_list is None` branch never runs, so it never
    recovers.

`__check_device_state()` is `cloud or gateway or lan`, so with the gateway
path silently dead the cloud becomes the only source of truth. The next
time the cloud MQTT connection drops, every device is marked offline at
once, even though the central hub gateway is connected and healthy the
whole time.

Observed on a 256-device / 2697-entity setup: an unplugged rice cooker
(8 entities, permanently unavailable) caused 18 of 30 such exceptions over
four days. Each cloud MQTT `Connection reset by peer` then took all 2643
gateway-backed entities offline until the cloud reconnected.

Returning `None` makes the existing caller logic work as written: the
failure is logged and, for the full refresh, retried until it succeeds.
`MIoTMipsError` remains in use elsewhere in the file, and the return type
is widened to `Optional[dict[str, dict]]` on the abstract method and on
`MipsCloudClient` to match.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-24 13:06:18 +08:00
Vergil Zhao
cf2a4bf649 fix: drain stale futures in __get_prop_handler on batch failure (#1723)
When get_props_async raises (cloud timeout, network error, etc.) the
pending futures registered in self._get_prop_list stay unresolved
forever. Subsequent get_prop_async calls with the same (did, siid, piid)
key reuse the dead future via the cache lookup at the top of
get_prop_async, so the integration never recovers from a single batch
failure until Home Assistant is restarted.

This was reproducible whenever the cloud HTTP request hung past the
caller's wait_for timeout: every later poll for that key returned the
same cancelled-but-still-pending future. Property entities driven by
async_update silently stopped updating with no error in the logs.

Wrap the await in try/except and fall through with results=[]. The
existing fallback loop then drains every key still in props_req with
set_result(None), unblocking awaiters and freeing the cache slot so
the next aggregation cycle starts fresh.
2026-09-24 12:17:12 +08:00
Li Shuzhen
8a59021445 fix: action errors and warnings (#1802)
* feat: ignore license in validate-hacs action

* feat: add brand icon

* style: format multi_lang.json

* feat: update to action/checkout@v5
2026-09-24 12:07:01 +08:00
Li Ji
89352d372a fix: drop non-UTF-8 cloud mips message instead of crashing mqtt loop (#1750)
MipsCloudClient._on_mips_message decodes the push payload with a bare
payload.decode('utf-8'). Some cloud pushes carry payloads that are not
valid UTF-8, which raises UnicodeDecodeError inside paho's on_message,
aborts the read loop and silently drops the message. Lost device
online/offline pushes can leave a device stuck unavailable until the
config entry is reloaded manually.

Catch UnicodeDecodeError, log the topic and the payload hex for
diagnosis, and skip the message so that one malformed push cannot
break message processing.

Related to #1749
2026-09-24 10:54:13 +08:00
Johan Claesson
6653f0d8b0 feat(multi_lang): add English and Swedish translations for viomi.vacuum.v18 (#1747)
Signed-off-by: Johan Claesson <81742448+Johan-Claesson@users.noreply.github.com>
2026-09-24 10:22:33 +08:00
Shiroki Satsuki
02ff2cd83c feat: humidifier mode name mapping (#1658) 2026-09-24 08:17:03 +08:00
Brandon
cd450162e4 fix: add state_class for co2-density sensor (#1631)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
Add co2-density property mapping to SPEC_PROP_TRANS_MAP to enable
statistics recording for CO2 sensors.

Changes:
- Import CONCENTRATION_PARTS_PER_MILLION from homeassistant.const
- Add co2-density mapping with:
  - device_class: SensorDeviceClass.CO2
  - state_class: SensorStateClass.MEASUREMENT
  - unit_of_measurement: CONCENTRATION_PARTS_PER_MILLION (ppm)

This ensures CO2 sensors (like those from CGDN1 device) have proper
device classification and Home Assistant can record long-term statistics.

Fixes #1630
2026-09-23 16:47:56 +08:00
Necroneco
dd341eeb24 fix: migrate the unique_id of the service entities (#1778)
The description of the service was appended to the unique_id of the service
entities without a migration step, so the entities registered before that
change were replaced by new ones. The entity_id of the new entity is
different, which silently breaks every automation, script and dashboard
referring to the old one.

Look up the entities that are still registered under the old unique_id when
the entry is set up, and rewrite it in place. The entity_id is left
untouched, so nothing referring to it has to be updated.

The lookup is keyed on the unique_id only and scoped to the config entry, and
nothing is written when the current unique_id is already registered, so it is
idempotent and cannot replace an entity that is in use. An entity that cannot
be migrated is reported and skipped, the others are still migrated.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 15:55:07 +08:00
Necroneco
48b0248892 fix: use a valid entity_id with the platform domain (#1777)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
Home Assistant reports the entity_id set by the integration as invalid when
its domain is not the platform domain, or when the object_id contains
characters that are not allowed, e.g. a MIoT-Spec-V2 description in Chinese
or a description that is empty once slugified. Both are deprecated and stop
working in 2027.5.0 and 2027.2.0.

Derive the platform domain from the Home Assistant entity base class that
each entity mixes in, and slugify the object_id.

The unique_id keeps using the integration domain and the raw description, so
it stays byte for byte identical for the entities that are already
registered. The entity_id of an already registered entity is owned by the
entity registry and is not changed either, and a newly registered entity gets
the same entity_id as before, since the registry was already slugifying the
object_id it was given.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: LiShuzhen <SusanPhevos@gmail.com>
2026-09-23 15:48:13 +08:00
Li Shuzhen
77c4c09823 fix: resolve hassfest validation errors and warnings (#1800) 2026-09-23 15:42:04 +08:00
Li Shuzhen
e22c900de1 fix: value precision (#1623) 2026-09-23 14:29:08 +08:00
Li Shuzhen
1a5f890cbe fix: tls verify mijia cloud mqtt broker hostname (#1774)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2026-08-18 17:48:40 +08:00
skyboooox
f290ff17d8 Fix sensor state class and units (#1595)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2026-01-28 15:31:27 +08:00
WoodenLoony
d4f31e8270 Update multi_lang.json (#1604)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2026-01-27 15:28:15 +08:00
Li Shuzhen
001af5384a docs: update changelog and version to v0.4.7 (#1599)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2026-01-07 10:45:07 +08:00
Li Shuzhen
c8d48625e9 Fix specs (#1567)
* fix: the playing-state property's access field of xiaomi.wifispeaker.lx04 and xiaomi.wifispeaker.lx06 (#1566)

* fix: the playing-state property's access field of xiaomi.wifispeaker.x08c

* feat: remove xiaomi.router.rd03 from UNSUPPORTED_MODELS and add era.airp.cwb03 into it

* fix: xiaomi.airc.h09h00 humidity-range unit (#1589)

* fix: add k0918.toothbrush.t700 into UNSUPPORTED_MODELS (#1585)

* fix: the playing-state property's access field of xiaomi.wifispeaker.l04m (#1596)
2026-01-07 10:04:42 +08:00
Mümin Köykıran
d4ac7a935e Feat/add turkish language (#1593)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* feat: add Turkish device translations to multi_lang.json

Added comprehensive Turkish (tr) translations for all 13 MIoT device specifications
in multi_lang.json to complete Turkish language support.

Changes:
- Added Turkish translations for all device properties, services, events, and actions
- Covers 13 device types: bath-heater, electronic-valve, fan, gateway, lock,
  plant-monitor, switch, thermostat, and vacuum
- Used proper Turkish characters (ç, ğ, ı, ö, ş, ü, İ)
- Maintained technical term consistency (Gateway→Ağ Geçidi, WiFi, IP, etc.)
- Followed formal Turkish (siz form) for professional user experience

Technical details:
- 135 lines added to multi_lang.json
- Turkish translations placed alphabetically after Russian (ru)
- JSON syntax validated successfully
- All translations follow same structure as existing languages (de, en, es, fr, ja, ru, zh-Hans, zh-Hant)

This completes the Turkish language support started in #1468, enabling Turkish-speaking
users to see device names and properties in their native language.

Users will need to update conversion rules via Integration CONFIGURE page in
Home Assistant for translations to take effect.

* feat: add comprehensive Turkish translations for vacuum devices

Added Turkish translations for 5 vacuum device models to multi_lang.json:
- Viomi V5 Pro (viomi-v38, viomi-v5): Full translation including map management
- Narwa vacuum models (narwa-001, narwa-ax11): Core features and map support
- Roidmi V60 (roidmi-v60): Complete vacuum functionality

Key translations added:
- Map management (Harita Yönetimi): Map list, active map, map name, map ID
- Battery and charging status
- Cleaning modes and suction power levels
- Consumables lifetime tracking
- Advanced settings (carpet mode, edge cleaning, obstacle detection)

This resolves Chinese text appearing in vacuum device interfaces by providing
local Turkish translations that override cloud-provided Chinese defaults.

Total vacuum devices with Turkish support: 6 models
File size: 617 lines (expanded from 442 lines)

* fix: sort multi_lang.json entries alphabetically

Sort all device URN entries in multi_lang.json to pass check-rule-format test.
Entries are now in alphabetical order as required by the test suite.

This fixes the failing GitHub Actions check-rule-format test.
2026-01-06 10:16:54 +08:00
Necroneco
ae047758de feat: add unit days to xiaomi.toothbrush.p001 (#1588)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2026-01-04 14:08:02 +08:00
Li Shuzhen
b40d357230 fix: update mesh offline state (#1579)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-12-31 09:58:29 +08:00
Li Shuzhen
f4d591b4d3 perf: remove unused device info (#1574)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-12-26 08:42:23 +08:00
Li Shuzhen
75390a3d83 docs: update changelog and version to v0.4.6 (#1565)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-12-18 09:37:27 +08:00
Li Shuzhen
86a739b503 feat: add tv-box device as media player entity (#1562) 2025-12-18 09:04:59 +08:00
Li Shuzhen
084694c9e7 fix: string property access of daikin air-fresher and air-conditioner (#1561) 2025-12-16 14:01:43 +08:00
Li Shuzhen
593d7d3c0a fix: retry to get cloud device list until successfully fetching device online state when the network resumes (#1555)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-12-16 08:29:16 +08:00
Li Shuzhen
77cebb2e15 Fix specs (#1553)
* fix: daikin.aircondition.k2 property format (#1364)

* fix: daikin.airfresh.k33 property format (#1364)

* feat: xiaomi.wifispeaker.x08e is not converted to the media player entity (#1533)

* docs: FAQ local mode in README
2025-12-16 08:28:37 +08:00
Li Shuzhen
3925e12863 fix: playing state of media player entity (#1552) 2025-12-16 08:28:16 +08:00
Li Shuzhen
500ed76971 fix: subscribe error catch (#1551) 2025-12-16 08:27:30 +08:00
Li Shuzhen
30ce1b4970 perf: cloud mqtt broker host constant value (#1530)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-12-04 12:19:21 +08:00
Li Shuzhen
d5c5e387c2 docs: update changelog and version to v0.4.5 (#1521)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-11-25 10:04:22 +08:00
Li Shuzhen
e6750bb746 feat: format value, then evaluate by expression, and set precision at last (#1516) 2025-11-25 09:31:40 +08:00
Li Shuzhen
1b87381f43 Fix specs (#1517)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* fix: xiaomi.waterpuri.s1200g filter property unit (#1489)

* fix: xiaomi.aircondition.c24 power consumption device class (#1243)

* fix: cuco.plug.cp7pd power consumption and power value precision (#1502)

* fix: lxzn.valve.02 electricity property unit (#1514)
2025-11-24 17:11:38 +08:00
Li Shuzhen
33ee65cf75 fix: ignore mdns REMOVED package (#1296)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-11-17 11:15:10 +08:00
Quint Stoffers
f95c71c2ad fix: xiaomi.derh.lite temperature precision (#1505)
* fix: xiaomi.derh.lite temperature precision

Add value-range step of 0.1 for dehumidifier temperature property to preserve decimal precision.

The xiaomi.derh.lite dehumidifier was reporting temperature as integer instead of float due to the default value-range step of 1. This fix changes the step to 0.1 to allow one decimal place precision (e.g., 22.5°C instead of 23°C).

Similar to the fix for cgllc.airm.cgd1st air monitor in commit 580ff87.

* chore: sort dehumidifier entry
2025-11-17 10:48:53 +08:00
Li Shuzhen
7abc20dcb5 docs: update changelog and version to v0.4.4 (#1497)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-11-11 09:12:55 +08:00
Li Shuzhen
3e33804477 Fix specs (#1496)
* fix: roidmi.vacuum.v60 duplicated service name for vacuum entity

* fix: cykj.hood.jyj22 spec urn version 4 (#1477)

* fix: lumi.motion.bmgl01 siid=2 piid=2 value-list (#1444)

* fix: ykcn.valve.cbcs power property value unit (#1488)

* fix: ainice.sensor_occupy.3b siid=2 piid=5,11,14,17 device_class (#1495)

* fix: qdhkl.airc.a42 hvac mode (#1483)
2025-11-11 08:56:33 +08:00
Mümin Köykıran
551b5cc938 feat: add Turkish language support (#1468)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* feat: add Turkish language support

Added comprehensive Turkish (tr) language translations for Xiaomi Home Integration.

Changes:
- Added custom_components/xiaomi_home/translations/tr.json with complete UI translations
- Added custom_components/xiaomi_home/miot/i18n/tr.json with MIoT-specific translations
- All placeholders, markdown formatting, and special characters preserved
- Validated against English source files for structural integrity

Technical details:
- Followed Home Assistant language code standards (ISO 639-1: tr)
- Maintained formal Turkish (siz form) for professional user experience
- Preserved all technical terms (OAuth2, MIoT-Spec-V2, MQTT, etc.)
- JSON structure validated and all keys match English version

* feat: add Turkish translations to bool_trans.yaml

Added Turkish boolean value translations for:
- default: true/false values
- contact_state: contact/no contact states
- motion_state: motion detected states
- open_close: open/close states
- yes_no: yes/no values

* docs: update README to reflect Turkish language support

Updated multiple language support section:
- Changed from 8 to 13 supported languages
- Added Turkish (tr) to the language code list
- Updated language list to include all currently supported languages:
  Italian, Dutch, Portuguese, Brazilian Portuguese, and Turkish

* fix: correct language dictionary sorting and update documentation

- Sort INTEGRATION_LANGUAGES dictionary alphabetically (tr after ru)
- Update CLAUDE.md to reflect 13 supported languages instead of 8
- Fixes test_miot_data_sort() test requirement
- No functional changes, documentation and code style improvements only

* docs: update Chinese README to reflect 13 supported languages

- Changed from 8 to 13 languages in Chinese documentation
- Added Turkish, Italian, Dutch, Portuguese, Brazilian Portuguese
- Updated language code list to include: it, nl, pt, pt-BR, tr
- Changed translation source note from "machine translation"
  to "machine translation or community contributions"
- Maintains consistency with English README.md
2025-11-10 09:50:02 +08:00
Li Shuzhen
f49e76937c fix: climate entity swing mode setting (#1486)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-11-07 10:19:31 +08:00
Li Shuzhen
a1a216aea6 fix: float value precision (#1485) 2025-11-07 10:19:01 +08:00
vshijiav
1ec325c9c7 fix: stop MQTT internal loop immediately when main loop is closed (#1484) 2025-11-07 10:18:25 +08:00
Li Shuzhen
c04fa542a3 docs: update changelog and version to v0.4.3 (#1453)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-10-14 08:33:36 +08:00
Li Shuzhen
fbddaf80a7 fix: pylint 4.0.0 (#1455)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-10-13 17:11:30 +08:00
Li Shuzhen
a11c3e2fda Fix specs (#1394)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* fix: xiaomi.airc.rr0r00 swing mode (#1386)

* fix: hyd.airer.lyjpro current-position (#1376)

* feat: add an alongside button entity for xiaomi.wifispeaker.l05b play action (#1372)

* fix: ignore the unsupported property 2.3 of 759413.aircondition.iez (#1391)

* fix: ignore unsupported properties of xiaomi.wifispeaker.l15a

* feat: zhimi.fan.za1 fan mode description in zh_Hans (#1424)

* fix: roidmi.vacuum.v60 siid=2 aiid=3 out field format (#1437)
2025-10-11 11:33:07 +08:00
Li Shuzhen
739998211e feat: remove VacuumEntityFeature.BATTERY from the vacuum entity (#1433)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-10-10 16:31:02 +08:00
Li Shuzhen
ec833b6539 feat: subscribe the proxy gateway child device up messages even though the device is offline (#1393)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* feat: subscribe the proxy gateway child device up messages even though the device is offline (#1313)

* feat: do not subscribe proxy gateway child device online/offline state message
2025-09-02 17:22:40 +08:00
Li Shuzhen
f2200ba003 fix: contact-state value format (#1387)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
2025-08-29 17:36:25 +08:00
Li Shuzhen
073cdf2dcb fix: integer value step (#1388) 2025-08-29 17:35:46 +08:00
Li Shuzhen
0f65635342 docs: update changelog and version to v0.4.2 (#1368) 2025-08-20 09:15:31 +08:00
Li Shuzhen
947169f18d Fix specs (#1367)
* fix: xiaomi.fan.p70 fan level

* fix: xiaomi.fan.p76 fan level

* fix: ignore hmpace.motion.v6nfc

* fix: xiaomi.airc.rr0r00 humidity-range

* fix: xiaomi.airc.h43h00 humidity-range

* fix: zhimi.humidifier.ca4 water level
2025-08-19 17:49:27 +08:00
Li Shuzhen
65a7a6d22a fix: correct the property value format after expression calculation (#1366) 2025-08-19 14:36:30 +08:00
Li Shuzhen
c29f7eecbd fix: delete all unsupported MIoT-Spec-V2 instances of Narwa vacuum (#1355) 2025-08-19 14:12:35 +08:00
Brandon Chen
58c671483e fix: add RETURN_HOME functionality for new vacuum cleaner model (#1344) 2025-08-19 10:15:01 +08:00
Li Shuzhen
7c97b85f02 docs: update changelog and version to v0.4.1 (#1336) 2025-08-04 09:44:12 +08:00
Li Shuzhen
3f2c2a648b Fix specs (#1329)
* fix: cuco.plug.cp2d electric current (#1279)

* fix: xiaomi.fan.p45 fan level (#1291)

* docs: add necessary notices

* fix: xiaomi.aircondition.c17 humidity-range unit (#1308)

* fix: xiaomi.airc.h40h00 humidity-range unit

* fix: sanmei.valve.s1 power consumption, current and voltage (#1327)

* fix: xiaomi.aircondition.m16 humidity-range unit
2025-08-01 14:56:42 +08:00
Li Shuzhen
f11b2f2f68 fix: hide sensitive info in printing logs (#1328) 2025-08-01 14:54:33 +08:00
Li Shuzhen
f3abbef94c fix: set the device on when the switch status is False or None (#1303)
* fix: set the air conditioner on if its switch status property is False or None (#1277)

* feat: add a standalone switch for 090615.aircondition.ktf

* fix: add an alongside switch for juhl.aircondition.hvac (#1287)
2025-07-30 15:15:28 +08:00
Li Shuzhen
dae63657d7 fix: vacuum status (#1299)
* fix: vacuum status (#1283)

* fix: vacuum continue to sweep

* refactor: core warnings about vacuum activity (#1288)
2025-07-30 15:14:20 +08:00
Li Shuzhen
3cc66450bd feat: cover dead zone width (#1301) 2025-07-30 15:13:04 +08:00
51 changed files with 4443 additions and 402 deletions

View File

@@ -5,8 +5,8 @@ body:
attributes:
label: Describe the Bug / 描述问题
description: |
> A clear and concise description of what the bug is.
> 清晰且简明地描述问题。
> A clear and concise description of what the bug is. Please include the device model information (Like xiaomi.gateway.hub1 which can be found in Device info page).
> 清晰且简明地描述问题。请注明设备 model 信息(例如 xiaomi.gateway.hub1,可在设备详情页查询)。
validations:
required: true

View File

@@ -8,7 +8,7 @@ jobs:
release-zip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: ZIP Component Dir
run: |

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install dependencies
run: |

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Hassfest validation
uses: home-assistant/actions/hassfest@master
@@ -23,18 +23,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: HACS validation
uses: hacs/action@main
with:
category: integration
ignore: license
validate-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install dependencies
run: |
@@ -49,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install the integration
run: |

View File

@@ -1,4 +1,101 @@
# 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
### Added
- Add tv-box device as the media player entity. [#1562](https://github.com/XiaoMi/ha_xiaomi_home/pull/1562)
- Set play-control service's play-loop-mode property as the sound mode. [#1562](https://github.com/XiaoMi/ha_xiaomi_home/pull/1562)
### Changed
- Use constant value to indicate the cloud MQTT broker host domain. [#1530](https://github.com/XiaoMi/ha_xiaomi_home/pull/1530)
- Use constant value to indicate the timer delay of refreshing devices. [#1555](https://github.com/XiaoMi/ha_xiaomi_home/pull/1555)
- Set the playing-state property as the required property in the play-control service of the speaker device. [#1552](https://github.com/XiaoMi/ha_xiaomi_home/pull/1552)
- Set the playing-state property as the required property in the optional play-control service of the television. [#1562](https://github.com/XiaoMi/ha_xiaomi_home/pull/1562)
### Fixed
- 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)
- Catch the http post error properly. [#1555](https://github.com/XiaoMi/ha_xiaomi_home/pull/1555)
- 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
### Changed
- Ignore mdns REMOVED package. [#1296](https://github.com/XiaoMi/ha_xiaomi_home/pull/1296)
- Format value type first, then evaluate by expression, and set precision at last. [#1516](https://github.com/XiaoMi/ha_xiaomi_home/pull/1516)
### Fixed
- Fix xiaomi.derh.lite temperature precision. [#1505](https://github.com/XiaoMi/ha_xiaomi_home/pull/1505)
- Fix xiaomi.waterpuri.s1200g filter property unit, lxzn.valve.02 electricity property unit, xiaomi.aircondition.c24 power consumption device class, and cuco.plug.cp7pd power consumption and power value precision. [#1517](https://github.com/XiaoMi/ha_xiaomi_home/pull/1517)
## v0.4.4
### Added
- Add Turkish language support. [#1468](https://github.com/XiaoMi/ha_xiaomi_home/pull/1468)
### Fixed
- Stop MQTT internal loop immediately when main loop is closed. [#1465](https://github.com/XiaoMi/ha_xiaomi_home/pull/1465)
- Fix the float value precision. [#1485](https://github.com/XiaoMi/ha_xiaomi_home/pull/1485)
- Fix the climate entity swing mode setting. [#1486](https://github.com/XiaoMi/ha_xiaomi_home/pull/1486)
- Fix the MIoT-Spec-V2 of cykj.hood.jyj22 urn version 4, lumi.motion.bmgl01 siid=2 piid=2 value-list, ykcn.valve.cbcs power property value unit, ainice.sensor_occupy.3b people-number property and qdhkl.airc.a42 hvac mode. [#1496](https://github.com/XiaoMi/ha_xiaomi_home/pull/1496)
## v0.4.3
### Changed
- Remove `VacuumEntityFeature.BATTERY` from the vacuum entity. [#1433](https://github.com/XiaoMi/ha_xiaomi_home/pull/1433)
- Subscribe the proxy gateway child device up messages even though the device is offline. [#1393](https://github.com/XiaoMi/ha_xiaomi_home/pull/1393)
### Fixed
- Fix the integer value step. [#1388](https://github.com/XiaoMi/ha_xiaomi_home/pull/1388)
- Fix the contact-state property value format. [#1387](https://github.com/XiaoMi/ha_xiaomi_home/pull/1387)
- Fix the MIoT-Spec-V2 of xiaomi.airc.rr0r00 swing mode and hyd.airer.lyjpro current-position. [#1394](https://github.com/XiaoMi/ha_xiaomi_home/pull/1394)
- Fix roidmi.vacuum.v60 siid=2 aiid=3 out field format.
- Ignore unsupported properties of xiaomi.wifispeaker.l15a and 759413.aircondition.iez.
- Add an alongside button entity for xiaomi.wifispeaker.l05b play action.
- Add zhimi.fan.za1 fan mode description in zh_Hans.
- Fix the error reported by pylint-4.0.0. [#1455](https://github.com/XiaoMi/ha_xiaomi_home/pull/1455)
## v0.4.2
### Changed
- Set the battery service's start-charge action as the fallback action to support RETURN_HOME feature of the vacuum entity. [#1344](https://github.com/XiaoMi/ha_xiaomi_home/pull/1344)
### Fixed
- Correct the property value format after expression calculation. [#1366](https://github.com/XiaoMi/ha_xiaomi_home/pull/1366)
- Fix the MIoT-Spec-V2 of xiaomi.fan.p70 and xiaomi.fan.p76 fan level, xiaomi.airc.rr0r00 and xiaomi.airc.h43h00 humidity-range, and zhimi.humidifier.ca4 water level. [#1367](https://github.com/XiaoMi/ha_xiaomi_home/pull/1367)
- Ignore the unsupported model hmpace.motion.v6nfc.
- Delete all unsupported MIoT-Spec-V2 instances of narwa.vacuum.001 and narwa.vacuum.ax11. [#1355](https://github.com/XiaoMi/ha_xiaomi_home/pull/1355)
## v0.4.1
### Changed
- The setting option "Cover closed position" in CONFIGURE is changed to "Cover dead zone width". [#1301](https://github.com/XiaoMi/ha_xiaomi_home/pull/1301)
- Add an alongside switch entity for 090615.aircondition.ktf and juhl.aircondition.hvac. [#1303](https://github.com/XiaoMi/ha_xiaomi_home/pull/1303)
### Fixed
- Fix the vacuum status so that the vacuum activity will not always be idle. [#1299](https://github.com/XiaoMi/ha_xiaomi_home/pull/1299)
- Set the device on when the switch status is False or None. [#1303](https://github.com/XiaoMi/ha_xiaomi_home/pull/1303)
- Hide sensitive info in printing logs. [#1328](https://github.com/XiaoMi/ha_xiaomi_home/pull/1328)
- Fix the MIoT-Spec-V2 of cuco.plug.cp2d electric current, xiaomi.fan.p45 fan level, sanmei.valve.s1 power consumption, current and voltage, xiaomi.aircondition.c17, xiaomi.aircondition.m16 and xiaomi.airc.h40h00 humidity-range unit. [#1329](https://github.com/XiaoMi/ha_xiaomi_home/pull/1329)
## v0.4.0
### Added
- Add the watch as the device tracker entity. [#1189](https://github.com/XiaoMi/ha_xiaomi_home/pull/1189)

192
CLAUDE.md Normal file
View File

@@ -0,0 +1,192 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Xiaomi Home Integration is an official Home Assistant integration for controlling Xiaomi IoT smart devices. It connects to devices via Xiaomi Cloud (MQTT) or locally through Xiaomi Central Hub Gateway. The integration converts MIoT-Spec-V2 device specifications into Home Assistant entities.
## Development Commands
### Installation & Setup
```bash
# Install to Home Assistant config directory
./install.sh /path/to/config
# Install test dependencies
pip install pytest pytest-asyncio pytest-dependency zeroconf paho.mqtt psutil cryptography slugify
```
### Testing
```bash
# Run all tests
pytest -v -s -m github ./test/
# Run specific test files
pytest -v -s ./test/test_spec.py
pytest -v -s ./test/test_cloud.py
pytest -v -s ./test/test_lan.py
# Check rule format
pytest -v -s -m github ./test/check_rule_format.py
```
### Code Quality
```bash
# Run pylint (follows Google Python Style Guide)
pylint $(git ls-files '*.py')
# Lint specific files
pylint custom_components/xiaomi_home/*.py
```
### Validation
```bash
# HACS validation (run by GitHub Actions)
# Uses: hacs/action@main
# Hassfest validation (run by GitHub Actions)
# Uses: home-assistant/actions/hassfest@master
```
## Architecture Overview
### Core Components (miot/)
The integration is built around the `miot/` core package:
**miot_client.py**: Top-level client instance representing a logged-in Xiaomi user. Each user login creates one MIoTClient. Manages authentication, device list, and message routing.
**miot_cloud.py**: OAuth 2.0 authentication and HTTP API calls to Xiaomi Cloud. Handles token refresh, user info, device control commands, and spec downloads.
**miot_mips.py**: Message bus (MQTT) for subscribing to device property changes and events. Implements both cloud (MipsCloudClient) and local (MipsLocalClient) message handling.
**miot_device.py**: Device entity class. Each MIoT device creates multiple MIoTDevice instances (one per Home Assistant entity). Handles property updates, action execution, and event processing.
**miot_spec.py**: MIoT-Spec-V2 parser. Parses device specifications (URN-based type system) from cloud or local cache. Each spec defines services, properties, events, and actions.
**miot_lan.py**: Local LAN control for IP devices in same network. Discovery and control without cloud (optional).
**miot_mdns.py**: mDNS discovery for Xiaomi Central Hub Gateway services.
**miot_storage.py**: File storage for certificates, device specs, translations, and cached data.
**miot_network.py**: Network status monitoring and IP address detection.
**miot_i18n.py**: Multi-language support (13 languages). Manages translations for entity names.
### Entity Conversion (specs/specv2entity.py)
MIoT-Spec-V2 instances are converted to Home Assistant entities using three mapping dictionaries:
- **SPEC_DEVICE_TRANS_MAP**: Whole-device patterns (e.g., vacuum, humidifier, climate)
- **SPEC_SERVICE_TRANS_MAP**: Service-level patterns (e.g., battery, air-purifier)
- **SPEC_PROP_TRANS_MAP**: Property-level patterns (e.g., temperature, humidity)
Conversion priority: Device > Service > Property > General rules
### Spec Customization Files (miot/specs/)
**spec_filter.yaml**: Filters out MIoT-Spec-V2 instances that should NOT be converted to entities. Uses device URN keys and supports wildcard matching for service/property/event/action IIDs.
**spec_modify.yaml**: Modifies spec instances before conversion (e.g., changing value ranges, access modes).
**multi_lang.json**: Local translation overrides with higher priority than cloud translations. Keyed by device URN (without version).
**spec_add.json**: Additional spec definitions for devices not in cloud database.
**bool_trans.yaml**: Boolean value translation mappings.
After editing spec files, you MUST update conversion rules via Integration CONFIGURE page in Home Assistant.
### Platform Files (custom_components/xiaomi_home/)
Standard Home Assistant platform files (sensor.py, switch.py, climate.py, etc.) implement entity registration and state management. Each platform imports from miot_device.py and creates entity subclasses.
**config_flow.py**: Configuration flow for OAuth login and device selection.
**__init__.py**: Integration setup, entry management, and data structure initialization.
## MIoT-Spec-V2 Concepts
**URN Format**: `urn:<namespace>:<type>:<name>:<value>[:<vendor-product>:<version>]`
- namespace: miot-spec-v2 (Xiaomi), bluetooth-spec (SIG), or vendor-specific
- type: device, service, property, event, action
- name: human-readable identifier (used for mapping)
**IIDs (Instance IDs)**: Decimal identifiers
- siid: Service Instance ID
- piid: Property Instance ID
- eiid: Event Instance ID
- aiid: Action Instance ID
**Instance Code Format**:
```
service:<siid> # service
service:<siid>:property:<piid> # property
service:<siid>:property:<piid>:valuelist:<index> # value list item
service:<siid>:event:<eiid> # event
service:<siid>:action:<aiid> # action
```
## Naming Conventions
From CONTRIBUTING.md:
- **Xiaomi**: Always "Xiaomi" in text. Variables: "xiaomi" or "mi"
- **Xiaomi Home**: Always "Xiaomi Home" in text. Variables: "mihome" or "MiHome"
- **Xiaomi IoT**: Always "MIoT" in text. Variables: "miot" or "MIoT"
- **Home Assistant**: Always "Home Assistant" in text. Variables: "hass" or "hass_xxx"
Mixed Chinese/English: Add space between Chinese and English or use Chinese quotation marks.
## Commit Message Format
```
<type>: <subject>
<body>
<footer>
```
Types: feat, fix, docs, style, refactor, perf, test, chore, revert
Subject: Imperative, present tense. Not capitalized. No period.
Body: Detailed description (mandatory except for docs type).
## Code Style
Follow [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html). Use the provided `.pylintrc` for linting.
## Debugging
Enable debug logging in Home Assistant configuration.yaml:
```yaml
logger:
default: critical
logs:
custom_components.xiaomi_home: debug
```
## Control Modes
- **Cloud Control**: MQTT message subscription + HTTP command API
- **Local Control**: Via Xiaomi Central Hub Gateway (firmware 3.3.0_0023+) or LAN control (IP devices only, may be unstable)
Central gateway local control takes priority over LAN control when both are available.
## Multi-Region Support
Regions: China (cn), Europe (eu), India (in), Russia (ru), Singapore (sg), USA (us)
User data is isolated per region. Integration supports multiple regions in same Home Assistant instance.
## Important Files Location
- Integration source: `custom_components/xiaomi_home/`
- Spec mappings: `custom_components/xiaomi_home/miot/specs/specv2entity.py`
- Spec filters: `custom_components/xiaomi_home/miot/specs/spec_filter.yaml`
- Translations: `custom_components/xiaomi_home/translations/` and `custom_components/xiaomi_home/miot/i18n/`
- Tests: `test/`

View File

@@ -91,13 +91,13 @@ Xiaomi Home Integration and the affiliated cloud interface is provided by Xiaomi
Yes, it supports multiple Xiaomi accounts. Furthermore, Xiaomi Home Integration allows that devices belonging to different accounts can be added to a same area.
- Does Xiaomi Home Integration support local control?
- Does Xiaomi Home Integration support local mode?
Local control is implemented by [Xiaomi Central Hub Gateway](https://www.mi.com/shop/buy/detail?product_id=15755&cfrom=search) (firmware version 3.3.0_0023 and above) or Xiaomi smart devices with built-in central hub gateway (software version 0.8.9 and above) inside. If you do not have a Xiaomi central hub gateway or other devices having central hub gateway function, all control commands are sent through Xiaomi Cloud. The firmware for Xiaomi central hub gateway including the built-in central hub gateway supporting Home Assistant local control feature has not been released yet. Please refer to MIoT team's notification for upgrade plans.
Local mode is implemented by [Xiaomi Central Hub Gateway](https://www.mi.com/shop/buy/detail?product_id=15755&cfrom=search) (firmware version 3.3.0_0023 and above) or Xiaomi smart devices with [built-in central hub gateway](https://github.com/XiaoMi/ha_xiaomi_home/wiki/Central-hub-gateway-device-models) (software version 0.8.9 and above) inside. If you do not have a Xiaomi central hub gateway or other devices having central hub gateway function, all control commands are sent through Xiaomi Cloud. The firmware for Xiaomi central hub gateway including the built-in central hub gateway supporting Home Assistant local mode feature has been released.
Xiaomi central hub gateway is only available in mainland China. In other regions, it is not available.
Xiaomi Home Integration can also implement partial local control by enabling Xiaomi LAN control function. Xiaomi LAN control function can only control IP devices (devices connected to the router via WiFi or ethernet cable) in the same local area network as Home Assistant. It cannot control BLE Mesh, ZigBee, etc. devices. This function may cause some abnormalities. We recommend not to use this function. Xiaomi LAN control function is enabled by [Settings > Devices & services > Configured > Xiaomi Home](https://my.home-assistant.io/redirect/integration/?domain=xiaomi_home) > CONFIGURE > Update LAN control configuration
Xiaomi Home Integration can also implement partial local mode by enabling Xiaomi LAN control function. Xiaomi LAN control function can only control IP devices (devices connected to the router via WiFi or ethernet cable) in the same local area network as Home Assistant. It cannot control BLE Mesh, ZigBee, etc. devices. This function may cause some abnormalities. We recommend NOT using this function. Xiaomi LAN control function is enabled by [Settings > Devices & services > Configured > Xiaomi Home](https://my.home-assistant.io/redirect/integration/?domain=xiaomi_home) > CONFIGURE > Update LAN control configuration.
Xiaomi LAN control function is not restricted by region. It is available in all regions. However, if there is a central gateway in the local area network where Home Assistant is located, even Xiaomi LAN control function is enabled in the integration, it will not take effect.
@@ -328,7 +328,7 @@ Device information service (urn:miot-spec-v2:service:device-information:00007801
## Multiple Language Support
There are 8 languages available for selection in the config flow language option of Xiaomi Home, including Simplified Chinese, Traditional Chinese, English, Spanish, Russian, French, German, and Japanese. The config flow page in Simplified Chinese and English has been manually reviewed by the developer. Other languages are translated by machine translation. If you want to modify the words and sentences in the config flow page, you need to modify the json file of the certain language in `custom_components/xiaomi_home/translations/` and `custom_components/xiaomi_home/miot/i18n/` directory.
There are 13 languages available for selection in the config flow language option of Xiaomi Home, including Simplified Chinese, Traditional Chinese, English, Spanish, Russian, French, German, Japanese, Italian, Dutch, Portuguese, Brazilian Portuguese, and Turkish. The config flow page in Simplified Chinese and English has been manually reviewed by the developer. Other languages are translated by machine translation or community contributions. If you want to modify the words and sentences in the config flow page, you need to modify the json file of the certain language in `custom_components/xiaomi_home/translations/` and `custom_components/xiaomi_home/miot/i18n/` directory.
When displaying Home Assistant entity name, Xiaomi Home downloads the multiple language file configured by the device vendor from MIoT Cloud, which contains translations for MIoT-Spec-V2 instances of the device. `multi_lang.json` is a locally maintained multiple language dictionary, which has a higher priority than the multiple language file obtained from the cloud and can be used to supplement or modify the multiple language translation of devices.
@@ -346,7 +346,7 @@ The format of `multi_lang.json` is as follows.
The key of `multi_lang.json` dictionary is the urn excluding the "version" field of the MIoT-Spec-V2 device instance.
The language code is zh-Hans, zh-Hant, en, es, ru, fr, de, or ja, corresponding to the 8 selectable languages mentioned above.
The language code is zh-Hans, zh-Hant, en, es, ru, fr, de, ja, it, nl, pt, pt-BR, or tr, corresponding to the 13 selectable languages mentioned above.
The instance code is the code of the MIoT-Spec-V2 instance, which is in the format of:
@@ -384,6 +384,7 @@ Example:
- Contribution Guidelines: [English](./CONTRIBUTING.md) | [简体中文](./doc/CONTRIBUTING_zh.md)
- [ChangeLog](./CHANGELOG.md)
- Development Documents: https://developers.home-assistant.io/docs/creating_component_index
- [FAQ](https://github.com/XiaoMi/ha_xiaomi_home/wiki)
## Directory Structure

View File

@@ -52,7 +52,7 @@ from typing import Optional
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
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.miot_storage import (
@@ -67,6 +67,8 @@ from .miot.miot_client import MIoTClient, get_miot_instance_async
_LOGGER = logging.getLogger(__name__)
CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
async def async_setup(hass: HomeAssistant, hass_config: dict) -> bool:
# pylint: disable=unused-argument
@@ -82,6 +84,52 @@ async def async_setup(hass: HomeAssistant, hass_config: dict) -> bool:
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(
hass: HomeAssistant, config_entry: ConfigEntry
) -> bool:
@@ -125,6 +173,13 @@ async def async_setup_entry(
await manufacturer.init_async()
miot_devices: list[MIoTDevice] = []
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():
spec_instance = await spec_parser.parse(urn=info['urn'])
if not isinstance(spec_instance, MIoTSpecInstance):
@@ -138,6 +193,16 @@ async def async_setup_entry(
spec_instance=spec_instance)
miot_devices.append(device)
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
for platform in SUPPORTED_PLATFORMS:
# 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):
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
await hass.config_entries.async_forward_entry_setups(
config_entry, SUPPORTED_PLATFORMS)

View File

@@ -70,8 +70,8 @@ async def async_setup_entry(
for miot_device in device_list:
if miot_device.miot_client.display_binary_bool:
for prop in miot_device.prop_list.get('binary_sensor', []):
new_entities.append(BinarySensor(
miot_device=miot_device, spec=prop))
new_entities.append(
BinarySensor(miot_device=miot_device, spec=prop))
if new_entities:
async_add_entities(new_entities)
@@ -90,7 +90,7 @@ class BinarySensor(MIoTPropertyEntity, BinarySensorEntity):
def is_on(self) -> bool:
"""On/Off state. True if the binary sensor is on, False otherwise."""
if self.spec.name == 'contact-state':
return self._value is False
return bool(self._value) is False
elif self.spec.name == 'occupancy-status':
return bool(self._value)
return self._value is True

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -320,9 +320,15 @@ class FeatureSwingMode(MIoTServiceEntity, ClimateEntity):
await self.set_property_async(prop=self._prop_vertical_swing,
value=True)
elif swing_mode == SWING_HORIZONTAL:
if self._prop_vertical_swing:
await self.set_property_async(prop=self._prop_vertical_swing,
value=False)
await self.set_property_async(prop=self._prop_horizontal_swing,
value=True)
elif swing_mode == SWING_VERTICAL:
if self._prop_horizontal_swing:
await self.set_property_async(prop=self._prop_horizontal_swing,
value=False)
await self.set_property_async(prop=self._prop_vertical_swing,
value=True)
elif swing_mode == SWING_OFF:
@@ -523,6 +529,8 @@ class AirConditioner(FeatureOnOff, FeatureTargetTemperature,
self._hvac_mode_map[item.value] = HVACMode.DRY
elif item.name in {'fan'}:
self._hvac_mode_map[item.value] = HVACMode.FAN_ONLY
elif item.name in {'heat_cool'}:
self._hvac_mode_map[item.value] = HVACMode.HEAT_COOL
self._attr_hvac_modes = list(self._hvac_mode_map.values())
self._prop_mode = prop
elif prop.name == 'ac-state':
@@ -546,7 +554,7 @@ class AirConditioner(FeatureOnOff, FeatureTargetTemperature,
f'{self.entity_id}')
return
# set the device on
if self.get_prop_value(prop=self._prop_on) is False:
if self.get_prop_value(prop=self._prop_on) is not True:
await self.set_property_async(prop=self._prop_on,
value=True,
write_ha_state=False)

View File

@@ -75,11 +75,12 @@ from .miot.const import (
DEFAULT_CLOUD_SERVER,
DEFAULT_CTRL_MODE,
DEFAULT_INTEGRATION_LANGUAGE,
DEFAULT_COVER_CLOSED_POSITION,
MIN_COVER_CLOSED_POSITION,
MAX_COVER_CLOSED_POSITION,
DEFAULT_COVER_DEAD_ZONE_WIDTH,
MIN_COVER_DEAD_ZONE_WIDTH,
MAX_COVER_DEAD_ZONE_WIDTH,
DEFAULT_NICK_NAME,
DEFAULT_OAUTH2_API_HOST,
DEFAULT_CLOUD_BROKER_HOST,
DOMAIN,
OAUTH2_AUTH_URL,
OAUTH2_CLIENT_ID,
@@ -91,6 +92,7 @@ from .miot.const import (
MIHOME_CERT_EXPIRE_MARGIN
)
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_mdns import MipsService
from .miot.web_pages import oauth_redirect_page
@@ -132,7 +134,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
_cloud_server: str
_integration_language: str
_cover_closed_position: int
_cover_dz_width: int
_auth_info: dict
_nick_name: str
_home_selected: dict
@@ -155,7 +157,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self._main_loop = asyncio.get_running_loop()
self._cloud_server = DEFAULT_CLOUD_SERVER
self._integration_language = DEFAULT_INTEGRATION_LANGUAGE
self._cover_closed_position = DEFAULT_COVER_CLOSED_POSITION
self._cover_dz_width = DEFAULT_COVER_DEAD_ZONE_WIDTH
self._storage_path = ''
self._virtual_did = ''
self._uid = ''
@@ -174,6 +176,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self._oauth_redirect_url_full = ''
self._miot_oauth = None
self._miot_http = None
self._system_info = ''
self._cc_home_info = {}
self._cc_home_list_show = {}
@@ -307,6 +310,9 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
): bool,
}),
errors={'base': reason},
description_placeholders={
'oauth_redirect_url': OAUTH_REDIRECT_URL,
},
last_step=False,
)
@@ -379,8 +385,8 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
client_id=f'ha.{self._uid}',
protocol=client.MQTTv5) # type: ignore
if mqtt_client.connect(
host=f'{self._cloud_server}-ha.mqtt.io.mi.com',
port=8883) != 0:
host=f'{self._cloud_server}-{DEFAULT_CLOUD_BROKER_HOST}',
port=8883) != 0:
raise RuntimeError('mqtt connect error')
mqtt_client.disconnect()
except Exception as err: # pylint: disable=broad-exception-caught
@@ -411,11 +417,17 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
}),
errors={'base': reason},
description_placeholders={
'cloud_server': self._cloud_server,
'broker_host':
f'{self._cloud_server}-{DEFAULT_CLOUD_BROKER_HOST}:8883',
'http_host': (
DEFAULT_OAUTH2_API_HOST
if self._cloud_server == DEFAULT_CLOUD_SERVER
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}')},
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}'),
'bing_url': 'https://www.bing.com',
'oauth2_auth_url': OAUTH2_AUTH_URL,
'spec_api_url':
'https://miot-spec.org/miot-spec-v2/template/list/device',
},
last_step=False
)
@@ -428,11 +440,13 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
_LOGGER.info(
'async_step_oauth, redirect_url: %s',
self._oauth_redirect_url_full)
self._system_info = await get_system_info_str(self.hass)
miot_oauth = MIoTOauthClient(
client_id=OAUTH2_CLIENT_ID,
redirect_url=self._oauth_redirect_url_full,
cloud_server=self._cloud_server,
uuid=self._uuid,
system_info=self._system_info,
loop=self._main_loop)
self._cc_oauth_auth_url = miot_oauth.gen_auth_url(
redirect_url=self._oauth_redirect_url_full)
@@ -510,7 +524,9 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self._miot_http = MIoTHttpClient(
cloud_server=self._cloud_server,
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:
self._miot_http.update_http_header(
cloud_server=self._cloud_server,
@@ -956,7 +972,7 @@ class XiaomiMihomeConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
'action_debug': self._action_debug,
'hide_non_standard_entities':
self._hide_non_standard_entities,
'cover_closed_position': self._cover_closed_position,
'cover_dead_zone_width': self._cover_dz_width,
'display_binary_mode': self._display_binary_mode,
'display_devices_changed_notify':
self._display_devices_changed_notify
@@ -1001,7 +1017,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
_hide_non_standard_entities: bool
_display_binary_mode: list[str]
_display_devs_notify: list[str]
_cover_closed_position: int
_cover_dz_width: int
_oauth_redirect_url_full: str
_auth_info: dict
@@ -1022,7 +1038,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
_opt_lan_ctrl_cfg: bool
_opt_network_detect_cfg: bool
_opt_check_network_deps: bool
_cover_pos_new: int
_cover_width_new: int
_trans_rules_count: int
_trans_rules_count_success: int
@@ -1051,8 +1067,8 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._ctrl_mode = self._entry_data.get('ctrl_mode', DEFAULT_CTRL_MODE)
self._integration_language = self._entry_data.get(
'integration_language', DEFAULT_INTEGRATION_LANGUAGE)
self._cover_closed_position = self._entry_data.get(
'cover_closed_position', DEFAULT_COVER_CLOSED_POSITION)
self._cover_dz_width = self._entry_data.get(
'cover_dead_zone_width', DEFAULT_COVER_DEAD_ZONE_WIDTH)
self._nick_name = self._entry_data.get('nick_name', DEFAULT_NICK_NAME)
self._action_debug = self._entry_data.get('action_debug', False)
self._hide_non_standard_entities = self._entry_data.get(
@@ -1078,7 +1094,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._action_debug_new = False
self._hide_non_standard_entities_new = False
self._display_binary_mode_new = []
self._cover_pos_new = self._cover_closed_position
self._cover_width_new = self._cover_dz_width
self._update_user_info = False
self._update_devices = False
self._update_trans_rules = False
@@ -1181,6 +1197,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
}),
description_placeholders={
'cloud_server': CLOUD_SERVERS[self._cloud_server],
'oauth_redirect_url': OAUTH_REDIRECT_URL,
},
last_step=False,
)
@@ -1264,10 +1281,13 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
'get_access_token, %s, %s', err, traceback.format_exc())
raise MIoTConfigError('get_token_error') from err
# Check uid
system_info = await get_system_info_str(self.hass)
m_http: MIoTHttpClient = MIoTHttpClient(
cloud_server=self._cloud_server,
client_id=OAUTH2_CLIENT_ID,
access_token=auth_info['access_token'],
uuid=self._entry_data['uuid'],
system_info=system_info,
loop=self._main_loop)
if await m_http.get_uid_async() != self._uid:
raise AbortFlow('inconsistent_account')
@@ -1352,11 +1372,11 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
self._miot_i18n.translate(
'config.binary_mode')), # type: ignore
vol.Optional(
'cover_closed_position',
default=self._cover_closed_position # type: ignore
'cover_dead_zone_width',
default=self._cover_dz_width # type: ignore
): vol.All(vol.Coerce(int), vol.Range(
min=MIN_COVER_CLOSED_POSITION,
max=MAX_COVER_CLOSED_POSITION)),
min=MIN_COVER_DEAD_ZONE_WIDTH,
max=MAX_COVER_DEAD_ZONE_WIDTH)),
vol.Required(
'update_trans_rules',
default=self._update_trans_rules # type: ignore
@@ -1395,8 +1415,8 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
'update_lan_ctrl_config', self._opt_lan_ctrl_cfg)
self._opt_network_detect_cfg = user_input.get(
'network_detect_config', self._opt_network_detect_cfg)
self._cover_pos_new = user_input.get(
'cover_closed_position', self._cover_closed_position)
self._cover_width_new = user_input.get(
'cover_dead_zone_width', self._cover_dz_width)
return await self.async_step_update_user_info()
@@ -1887,8 +1907,8 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
client_id=f'ha.{self._uid}',
protocol=client.MQTTv5) # type: ignore
if mqtt_client.connect(
host=f'{self._cloud_server}-ha.mqtt.io.mi.com',
port=8883) != 0:
host=f'{self._cloud_server}-{DEFAULT_CLOUD_BROKER_HOST}',
port=8883) != 0:
raise RuntimeError('mqtt connect error')
mqtt_client.disconnect()
except Exception as err: # pylint: disable=broad-exception-caught
@@ -1919,11 +1939,17 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
}),
errors={'base': reason},
description_placeholders={
'cloud_server': self._cloud_server,
'broker_host':
f'{self._cloud_server}-{DEFAULT_CLOUD_BROKER_HOST}:8883',
'http_host': (
DEFAULT_OAUTH2_API_HOST
if self._cloud_server == DEFAULT_CLOUD_SERVER
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}')},
else f'{self._cloud_server}.{DEFAULT_OAUTH2_API_HOST}'),
'bing_url': 'https://www.bing.com',
'oauth2_auth_url': OAUTH2_AUTH_URL,
'spec_api_url':
'https://miot-spec.org/miot-spec-v2/template/list/device',
},
last_step=False
)
@@ -1945,7 +1971,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
'nick_name': self._nick_name,
'lang_new': INTEGRATION_LANGUAGES[self._lang_new],
'nick_name_new': self._nick_name_new,
'cover_pos_new': self._cover_pos_new,
'cover_width_new': self._cover_width_new,
'devices_add': len(self._devices_add),
'devices_remove': len(self._devices_remove),
'trans_rules_count': self._trans_rules_count,
@@ -1972,8 +1998,8 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
if self._lang_new != self._integration_language:
self._entry_data['integration_language'] = self._lang_new
self._need_reload = True
if self._cover_pos_new != self._cover_closed_position:
self._entry_data['cover_closed_position'] = self._cover_pos_new
if self._cover_width_new != self._cover_dz_width:
self._entry_data['cover_dead_zone_width'] = self._cover_width_new
self._need_reload = True
if self._update_user_info:
self._entry_data['nick_name'] = self._nick_name_new

View File

@@ -91,7 +91,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry,
class Cover(MIoTServiceEntity, CoverEntity):
"""Cover entities for Xiaomi Home."""
# pylint: disable=unused-argument
_cover_closed_position: int
_cover_dead_zone_width: int
_prop_motor_control: Optional[MIoTSpecProperty]
_prop_motor_value_open: Optional[int]
_prop_motor_value_close: Optional[int]
@@ -116,8 +116,8 @@ class Cover(MIoTServiceEntity, CoverEntity):
self._attr_supported_color_modes = set()
self._attr_supported_features = CoverEntityFeature(0)
self._cover_closed_position = (
miot_device.miot_client.cover_closed_position)
self._cover_dead_zone_width = (
miot_device.miot_client.cover_dead_zone_width)
self._prop_motor_control = None
self._prop_motor_value_open = None
@@ -275,8 +275,14 @@ class Cover(MIoTServiceEntity, CoverEntity):
self._prop_pos_closing = False
return self.get_prop_value(prop=self._prop_target_position)
pos = self.get_prop_value(prop=self._prop_current_position)
return None if pos is None else round(pos * 100 /
self._prop_position_value_range)
if pos is None:
return None
pos = round(pos*100/self._prop_position_value_range)
if pos <= self._cover_dead_zone_width:
pos = 0
elif pos >= (100 - self._cover_dead_zone_width):
pos = 100
return pos
@property
def is_opening(self) -> Optional[bool]:
@@ -302,7 +308,7 @@ class Cover(MIoTServiceEntity, CoverEntity):
def is_closed(self) -> Optional[bool]:
"""Return if the cover is closed."""
if self.current_cover_position is not None:
return self.current_cover_position <= self._cover_closed_position
return self.current_cover_position == 0
# The current position is prior to the status when determining
# whether the cover is closed.
if self._prop_status and self._prop_status_closed:

View File

@@ -56,6 +56,8 @@ from homeassistant.components.humidifier import (HumidifierEntity,
HumidifierDeviceClass,
HumidifierEntityFeature,
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_device import MIoTDevice, MIoTEntityData, MIoTServiceEntity
@@ -130,7 +132,24 @@ class Humidifier(MIoTServiceEntity, HumidifierEntity):
if not prop.value_list:
_LOGGER.error('mode value_list is None, %s', self.entity_id)
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_supported_features |= HumidifierEntityFeature.MODES
self._prop_mode = prop

View File

@@ -25,7 +25,7 @@
"cryptography",
"psutil"
],
"version": "v0.4.0",
"version": "v0.5.0",
"zeroconf": [
"_miot-central._tcp.local."
]

View File

@@ -430,15 +430,16 @@ class FeatureState(MIoTServiceEntity, MediaPlayerEntity):
elif item.name in {'pause', 'paused'}:
self._playing_state_map[
item.value] = MediaPlayerState.PAUSED
self._prop_playing_state = prop
self._prop_playing_state = prop
@property
def state(self) -> Optional[MediaPlayerState]:
"""The current state."""
return (self.get_map_value(map_=self._playing_state_map,
key=self.get_prop_value(
prop=self._prop_playing_state))
if self._prop_playing_state else MediaPlayerState.ON)
current_state = self.get_prop_value(
prop=self._prop_playing_state) if self._prop_playing_state else None
return (MediaPlayerState.ON if
(current_state is None) else self.get_map_value(
map_=self._playing_state_map, key=current_state))
class WifiSpeaker(FeatureVolumeSet, FeatureVolumeMute, FeaturePlay,

View File

@@ -186,3 +186,19 @@ class MIoTHttp:
ev_loop = loop or asyncio.get_running_loop()
return await ev_loop.run_in_executor(
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})'
)

View File

@@ -45,7 +45,14 @@ off Xiaomi or its affiliates' products.
Constants.
"""
import json
from pathlib import Path
DOMAIN: str = 'xiaomi_home'
INTEGRATION_VERSION: str = json.loads(
(Path(__file__).parent.parent / 'manifest.json').read_text()
)['version']
DEFAULT_NAME: str = 'Xiaomi Home'
DEFAULT_NICK_NAME: str = 'Xiaomi'
@@ -60,6 +67,7 @@ NETWORK_REFRESH_INTERVAL: int = 30
OAUTH2_CLIENT_ID: str = '2882303761520251711'
OAUTH2_AUTH_URL: str = 'https://account.xiaomi.com/oauth2/authorize'
DEFAULT_OAUTH2_API_HOST: str = 'ha.api.io.mi.com'
DEFAULT_CLOUD_BROKER_HOST: str = 'ha.mqtt.io.mi.com'
# seconds, 14 days
SPEC_STD_LIB_EFFECTIVE_TIME = 3600*24*14
@@ -89,7 +97,9 @@ SUPPORTED_PLATFORMS: list = [
UNSUPPORTED_MODELS: list = [
'chuangmi.ir.v2',
'xiaomi.router.rd03'
'era.airp.cwb03',
'hmpace.motion.v6nfc',
'k0918.toothbrush.t700'
]
DEFAULT_CLOUD_SERVER: str = 'cn'
@@ -116,13 +126,14 @@ INTEGRATION_LANGUAGES = {
'pt': 'Português',
'pt-BR': 'Português (Brasil)',
'ru': 'Русский',
'tr': 'Türkçe',
'zh-Hans': '简体中文',
'zh-Hant': '繁體中文'
}
DEFAULT_COVER_CLOSED_POSITION: int = 0
MIN_COVER_CLOSED_POSITION: int = 0
MAX_COVER_CLOSED_POSITION: int = 5
DEFAULT_COVER_DEAD_ZONE_WIDTH: int = 0
MIN_COVER_DEAD_ZONE_WIDTH: int = 0
MAX_COVER_DEAD_ZONE_WIDTH: int = 5
DEFAULT_CTRL_MODE: str = 'auto'

View File

@@ -0,0 +1,160 @@
{
"config": {
"other": {
"devices": "Cihazlar",
"found_central_gateway": ", Yerel Merkezi Hub Ağ Geçidi Bulundu",
"without_room": "Oda atanmamış",
"no_display": "Gösterme"
},
"control_mode": {
"auto": "Otomatik",
"cloud": "Bulut"
},
"statistics_logic": {
"or": "VEYA mantığı",
"and": "VE mantığı"
},
"filter_mode": {
"exclude": "Hariç tut",
"include": "Dahil et"
},
"connect_type": {
"0": "WiFi",
"1": "yunyi cihazı",
"2": "Bulut cihazı",
"3": "ZigBee",
"4": "webSocket",
"5": "Sanal cihaz",
"6": "BLE",
"7": "Yerel AP",
"8": "WiFi+BLE",
"9": "Diğer",
"10": "İşlev eklentisi",
"11": "Hücresel ağ",
"12": "Kablo",
"13": "NB-IoT",
"14": "Üçüncü taraf bulut erişimi",
"15": "Kızılötesi uzaktan kumanda cihazı",
"16": "BLE-Mesh",
"17": "Sanal cihaz grubu",
"18": "Ağ geçidi alt cihazı",
"19": "Güvenlik seviyesi ağ geçidi alt cihazı",
"22": "PLC",
"23": "Yalnızca kablo",
"24": "Matter",
"25": "WiFi+Hücresel ağ"
},
"room_name_rule": {
"none": "Senkronize etme",
"home_room": "Ev Adı ve Oda Adı (Xiaomi Home Yatak Odası)",
"room": "Oda Adı (Yatak Odası)",
"home": "Ev Adı (Xiaomi Home)"
},
"option_status": {
"enable": "Etkinleştir",
"disable": "Devre Dışı Bırak"
},
"binary_mode": {
"text": "Metin Sensör Varlığı",
"bool": "İkili Sensör Varlığı"
},
"device_state": {
"add": "Ekle",
"del": "Kullanılamıyor",
"offline": "Çevrimdışı"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[Bildirim]** Aynı ağa bağlı olabilecek birden fazla ağ kartı algılandı. Lütfen seçime dikkat edin.",
"net_unavailable": "Arayüz kullanılamıyor"
}
},
"oauth2": {
"success": {
"title": "Kimlik Doğrulama Başarılı",
"content": "Lütfen bu sayfayı kapatın ve 'İleri'ye tıklamak için hesap kimlik doğrulama sayfasına geri dönün.",
"button": "Kapat"
},
"fail": {
"title": "Kimlik Doğrulama Başarısız",
"content": "{error_msg}, lütfen bu sayfayı kapatın ve kimlik doğrulama bağlantısına tekrar tıklamak için hesap kimlik doğrulama sayfasına geri dönün.",
"button": "Kapat"
},
"error_msg": {
"-10100": "Geçersiz yanıt parametreleri ('code' veya 'state' alanı boş)",
"-10101": "Geçirilen 'state' alanı uyumsuz"
}
},
"miot": {
"client": {
"invalid_oauth_info": "Kimlik doğrulama bilgileri geçersiz, bulut bağlantısı kullanılamayacak, lütfen Xiaomi Home entegrasyon sayfasına girin, yeniden kimlik doğrulaması yapmak için 'Seçenekler'e tıklayın",
"invalid_device_cache": "Önbellek cihaz bilgileri anormal, lütfen Xiaomi Home entegrasyon sayfasına girin, yerel önbelleği güncellemek için 'Seçenekler->Cihaz listesini güncelle'ye tıklayın",
"invalid_cert_info": "Geçersiz kullanıcı sertifikası, yerel merkezi bağlantı kullanılamayacak, lütfen Xiaomi Home entegrasyon sayfasına girin, yeniden kimlik doğrulaması yapmak için 'Seçenekler'e tıklayın",
"device_cloud_error": "Buluttan cihaz bilgileri alınırken bir istisna oluştu, lütfen yerel ağ bağlantısını kontrol edin",
"xiaomi_home_error_title": "Xiaomi Home Entegrasyon Hatası",
"xiaomi_home_error": "**{nick_name}({uid}, {cloud_server})** hatası algılandı, lütfen yeniden yapılandırmak için seçenekler sayfasına girin.\n\n**Hata mesajı**: \n{message}",
"device_list_changed_title": "Xiaomi Home cihaz listesi değişiklikleri",
"device_list_changed": "**{nick_name}({uid}, {cloud_server})** cihaz bilgilerinin değiştiği algılandı, lütfen entegrasyon seçenekleri sayfasına girin, yerel cihaz bilgilerini güncellemek için `Seçenekler->Cihaz listesini güncelle`ye tıklayın.\n\nGeçerli ağ durumu: {network_status}\n{message}\n",
"device_list_add": "\n**{count} yeni cihaz:** \n{message}",
"device_list_del": "\n**{count} cihaz kullanılamıyor:** \n{message}",
"device_list_offline": "\n**{count} cihaz çevrimdışı:** \n{message}",
"network_status_online": "Çevrimiçi",
"network_status_offline": "Çevrimdışı",
"central_state_changed_title": "Merkezi Hub Ağ Geçidi Bağlantı Durumu",
"central_state_changed": "**{nick_name}({uid}, {cloud_server})** Xiaomi merkezi hub ağ geçidine yerel bağlantı: {conn_status}",
"central_state_connected": "Bağlandı",
"central_state_disconnected": "Bağlantı kesildi",
"device_exec_error": "Yürütme hatası"
}
},
"error": {
"common": {
"-10000": "Bilinmeyen hata",
"-10001": "Hizmet kullanılamıyor",
"-10002": "Geçersiz parametre",
"-10003": "Yetersiz kaynaklar",
"-10004": "İç hata",
"-10005": "Yetersiz izinler",
"-10006": "Yürütme zaman aşımı",
"-10007": "Cihaz çevrimdışı veya mevcut değil",
"-10020": "Yetkisiz (OAuth2)",
"-10030": "Geçersiz token (HTTP)",
"-10040": "Geçersiz mesaj formatı",
"-10050": "Geçersiz sertifika",
"-704000000": "Bilinmeyen hata",
"-704010000": "Yetkisiz (cihaz silinmiş olabilir)",
"-704014006": "Cihaz açıklaması bulunamadı",
"-704030013": "Özellik okunabilir değil",
"-704030023": "Özellik yazılabilir değil",
"-704030033": "Özellik abone edilebilir değil",
"-704040002": "Hizmet mevcut değil",
"-704040003": "Özellik mevcut değil",
"-704040004": "Olay mevcut değil",
"-704040005": "Eylem mevcut değil",
"-704040999": "Özellik çevrimiçi değil",
"-704042001": "Cihaz mevcut değil",
"-704042011": "Cihaz çevrimdışı",
"-704053036": "Cihaz işlemi zaman aşımı",
"-704053100": "Cihaz mevcut durumda bu işlemi gerçekleştiremiyor",
"-704083036": "Cihaz işlemi zaman aşımı",
"-704090001": "Cihaz mevcut değil",
"-704220008": "Geçersiz ID",
"-704220025": "Eylem parametre sayısı uyumsuz",
"-704220035": "Eylem parametre hatası",
"-704220043": "Özellik değer hatası",
"-704222034": "Eylem dönüş değer hatası",
"-705004000": "Bilinmeyen hata",
"-705004501": "Bilinmeyen hata",
"-705201013": "Özellik okunabilir değil",
"-705201015": "Eylem yürütme hatası",
"-705201023": "Özellik yazılabilir değil",
"-705201033": "Özellik abone edilebilir değil",
"-706012000": "Bilinmeyen hata",
"-706012013": "Özellik okunabilir değil",
"-706012015": "Eylem yürütme hatası",
"-706012023": "Özellik yazılabilir değil",
"-706012033": "Özellik abone edilebilir değil",
"-706012043": "Özellik değer hatası",
"-706014006": "Cihaz açıklaması bulunamadı"
}
}
}

View File

@@ -59,12 +59,12 @@ from homeassistant.core import HomeAssistant
from homeassistant.components import zeroconf
# 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 (
DEFAULT_CTRL_MODE, DEFAULT_INTEGRATION_LANGUAGE, DEFAULT_NICK_NAME, DOMAIN,
MIHOME_CERT_EXPIRE_MARGIN, NETWORK_REFRESH_INTERVAL,
OAUTH2_CLIENT_ID, SUPPORT_CENTRAL_GATEWAY_CTRL,
DEFAULT_COVER_CLOSED_POSITION)
DEFAULT_COVER_DEAD_ZONE_WIDTH)
from .miot_cloud import MIoTHttpClient, MIoTOauthClient
from .miot_error import MIoTClientError, MIoTErrorCode
from .miot_mips import (
@@ -79,6 +79,12 @@ from .miot_i18n import MIoTI18n
_LOGGER = logging.getLogger(__name__)
REFRESH_PROPS_DELAY = 0.2
REFRESH_PROPS_RETRY_DELAY = 3
REFRESH_CLOUD_DEVICES_DELAY = 6
REFRESH_CLOUD_DEVICES_RETRY_DELAY = 60
REFRESH_GATEWAY_DEVICES_DELAY = 3
@dataclass
class MIoTClientSub:
"""MIoT client subscription."""
@@ -183,6 +189,7 @@ class MIoTClient:
storage: MIoTStorage,
mips_service: MipsService,
miot_lan: MIoTLan,
system_info: str = '',
loop: Optional[asyncio.AbstractEventLoop] = None) -> None:
# MUST run in a running event loop
self._main_loop = loop or asyncio.get_running_loop()
@@ -201,6 +208,7 @@ class MIoTClient:
self._entry_data = entry_data
self._uid = entry_data['uid']
self._cloud_server = entry_data['cloud_server']
self._system_info = system_info
self._ctrl_mode = CtrlMode.load(
entry_data.get('ctrl_mode', DEFAULT_CTRL_MODE))
self._network = network
@@ -253,7 +261,18 @@ class MIoTClient:
if not self._user_config:
# Integration need to be add again
raise MIoTClientError('load_user_config_async error')
_LOGGER.debug('user config, %s', json.dumps(self._user_config))
# Hide sensitive info in printing
p_user_config: dict = deepcopy(self._user_config)
p_access_token: str = p_user_config['auth_info']['access_token']
p_refresh_token: str = p_user_config['auth_info']['refresh_token']
p_mac_key: str = p_user_config['auth_info']['mac_key']
p_user_config['auth_info'][
'access_token'] = f"{p_access_token[:5]}***{p_access_token[-5:]}"
p_user_config['auth_info'][
'refresh_token'] = f"{p_refresh_token[:5]}***{p_refresh_token[-5:]}"
p_user_config['auth_info'][
'mac_key'] = f"{p_mac_key[:5]}***{p_mac_key[-5:]}"
_LOGGER.debug('user config, %s', json.dumps(p_user_config))
# MIoT i18n client
self._i18n = MIoTI18n(
lang=self._entry_data.get(
@@ -268,12 +287,15 @@ class MIoTClient:
redirect_url=self._entry_data['oauth_redirect_url'],
cloud_server=self._cloud_server,
uuid=self._entry_data["uuid"],
system_info=self._system_info,
loop=self._main_loop)
# MIoT http client instance
self._http = MIoTHttpClient(
cloud_server=self._cloud_server,
client_id=OAUTH2_CLIENT_ID,
access_token=self._user_config['auth_info']['access_token'],
uuid=self._entry_data['uuid'],
system_info=self._system_info,
loop=self._main_loop)
# MIoT cert client
self._cert = MIoTCert(
@@ -488,9 +510,9 @@ class MIoTClient:
return self._display_binary_bool
@property
def cover_closed_position(self) -> int:
return self._entry_data.get('cover_closed_position',
DEFAULT_COVER_CLOSED_POSITION)
def cover_dead_zone_width(self) -> int:
return self._entry_data.get('cover_dead_zone_width',
DEFAULT_COVER_DEAD_ZONE_WIDTH)
@display_devices_changed_notify.setter
def display_devices_changed_notify(self, value: list[str]) -> None:
@@ -706,7 +728,7 @@ class MIoTClient:
if self._refresh_props_timer:
return
self._refresh_props_timer = self._main_loop.call_later(
0.2, lambda: self._main_loop.create_task(
REFRESH_PROPS_DELAY, lambda: self._main_loop.create_task(
self.__refresh_props_handler()))
async def get_prop_async(self, did: str, siid: int, piid: int) -> Any:
@@ -1037,11 +1059,11 @@ class MIoTClient:
mips = self._mips_local.get(group_id, None)
if mips:
if state == MipsServiceState.REMOVED:
mips.disconnect()
self._mips_local.pop(group_id, None)
return
if (
# if state == MipsServiceState.REMOVED:
# mips.disconnect()
# self._mips_local.pop(group_id, None)
# return
if ( # ADDED or UPDATED
mips.client_id == self._entry_data['virtual_did']
and mips.host == data['addresses'][0]
and mips.port == data['port']
@@ -1239,7 +1261,15 @@ class MIoTClient:
) -> None:
_LOGGER.info(
'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(
payload=json.dumps(payload))
if gw_list is None:
@@ -1363,10 +1393,13 @@ class MIoTClient:
"""Update cloud devices.
NOTICE: This function will operate the cloud_list
"""
# MIoT cloud service may not publish the online state updating message
# MIoT cloud may not publish the online state updating message
# for the BLE device. Assume that all BLE devices are online.
# MIoT cloud does not publish the online state updating message for the
# child device under the proxy gateway (eg, VRF air conditioner
# controller). Assume that all proxy gateway child devices are online.
for did, info in cloud_list.items():
if did.startswith('blt.'):
if did.startswith('blt.') or did.startswith('proxy.'):
info['online'] = True
for did, info in self._device_list_cache.items():
if filter_dids and did not in filter_dids:
@@ -1419,9 +1452,19 @@ class MIoTClient:
async def __refresh_cloud_devices_async(self) -> None:
_LOGGER.debug(
'refresh cloud devices, %s, %s', self._uid, self._cloud_server)
self._refresh_cloud_devices_timer = None
result = await self._http.get_devices_async(
home_ids=list(self._entry_data.get('home_selected', {}).keys()))
if self._refresh_cloud_devices_timer:
self._refresh_cloud_devices_timer.cancel()
self._refresh_cloud_devices_timer = None
try:
result = await self._http.get_devices_async(
home_ids=list(self._entry_data.get('home_selected', {}).keys()))
except Exception as err: # pylint: disable=broad-exception-caught
_LOGGER.error('refresh cloud devices failed, %s', err)
self._refresh_cloud_devices_timer = self._main_loop.call_later(
REFRESH_CLOUD_DEVICES_RETRY_DELAY,
lambda: self._main_loop.create_task(
self.__refresh_cloud_devices_async()))
return
if not result and 'devices' not in result:
self.__show_client_error_notify(
message=self._i18n.translate(
@@ -1467,17 +1510,11 @@ class MIoTClient:
_LOGGER.debug(
'request refresh cloud devices, %s, %s',
self._uid, self._cloud_server)
if immediately:
if self._refresh_cloud_devices_timer:
self._refresh_cloud_devices_timer.cancel()
self._refresh_cloud_devices_timer = self._main_loop.call_later(
0, lambda: self._main_loop.create_task(
self.__refresh_cloud_devices_async()))
return
delay_sec : int = 0 if immediately else REFRESH_CLOUD_DEVICES_DELAY
if self._refresh_cloud_devices_timer:
return
self._refresh_cloud_devices_timer.cancel()
self._refresh_cloud_devices_timer = self._main_loop.call_later(
6, lambda: self._main_loop.create_task(
delay_sec, lambda: self._main_loop.create_task(
self.__refresh_cloud_devices_async()))
@final
@@ -1495,6 +1532,8 @@ class MIoTClient:
if did not in filter_dids:
continue
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
device_new = gw_list.pop(did, None)
if device_new:
@@ -1508,7 +1547,7 @@ class MIoTClient:
device_old['online'] = False
# Update cache 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
self.__update_device_msg_sub(did=did)
state_old: Optional[bool] = info.get('online', None)
@@ -1566,7 +1605,14 @@ class MIoTClient:
if not mips.mips_state:
_LOGGER.debug('local mips disconnect, skip refresh, %s', group_id)
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:
_LOGGER.error(
'refresh gw devices with group_id failed, %s, %s',
@@ -1601,7 +1647,8 @@ class MIoTClient:
return
self._mips_local_state_changed_timers[group_id] = (
self._main_loop.call_later(
3, lambda: self._main_loop.create_task(
REFRESH_GATEWAY_DEVICES_DELAY,
lambda: self._main_loop.create_task(
self.__refresh_gw_devices_with_group_id_async(
group_id=group_id))))
@@ -1755,7 +1802,7 @@ class MIoTClient:
self._refresh_props_retry_count = 0
if self._refresh_props_list:
self._refresh_props_timer = self._main_loop.call_later(
0.2, lambda: self._main_loop.create_task(
REFRESH_PROPS_DELAY, lambda: self._main_loop.create_task(
self.__refresh_props_handler()))
else:
self._refresh_props_timer = None
@@ -1774,7 +1821,7 @@ class MIoTClient:
_LOGGER.info(
'refresh props failed, retry, %s', self._refresh_props_retry_count)
self._refresh_props_timer = self._main_loop.call_later(
3, lambda: self._main_loop.create_task(
REFRESH_PROPS_RETRY_DELAY, lambda: self._main_loop.create_task(
self.__refresh_props_handler()))
@final
@@ -1999,6 +2046,7 @@ async def get_miot_instance_async(
hass.data[DOMAIN]['miot_lan'] = miot_lan
_LOGGER.info('create miot_lan instance')
# MIoT client
system_info = await get_system_info_str(hass)
miot_client = MIoTClient(
entry_id=entry_id,
entry_data=entry_data,
@@ -2006,6 +2054,7 @@ async def get_miot_instance_async(
storage=storage,
mips_service=mips_service,
miot_lan=miot_lan,
system_info=system_info,
loop=loop
)
miot_client.persistent_notify = persistent_notify

View File

@@ -61,6 +61,7 @@ from .common import calc_group_id
from .const import (
UNSUPPORTED_MODELS,
DEFAULT_OAUTH2_API_HOST,
INTEGRATION_VERSION,
MIHOME_HTTP_API_TIMEOUT,
OAUTH2_AUTH_URL)
from .miot_error import MIoTErrorCode, MIoTHttpError, MIoTOauthError
@@ -78,11 +79,13 @@ class MIoTOauthClient:
_client_id: int
_redirect_url: str
_device_id: str
_user_agent: str
_state: str
def __init__(
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:
self._main_loop = loop or asyncio.get_running_loop()
if client_id is None or client_id.strip() == '':
@@ -101,6 +104,10 @@ class MIoTOauthClient:
else:
self._oauth_host = f'{cloud_server}.{DEFAULT_OAUTH2_API_HOST}'
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(
f'd={self._device_id}'.encode('utf-8')).hexdigest()
self._session = aiohttp.ClientSession(loop=self._main_loop)
@@ -161,7 +168,10 @@ class MIoTOauthClient:
http_res = await self._session.get(
url=f'https://{self._oauth_host}/app/v2/ha/oauth/get_token',
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
)
if http_res.status == 401:
@@ -239,12 +249,14 @@ class MIoTHttpClient:
_base_url: str
_client_id: str
_access_token: str
_user_agent: str
_get_prop_timer: Optional[asyncio.TimerHandle]
_get_prop_list: dict[str, dict]
def __init__(
self, cloud_server: str, client_id: str, access_token: str,
uuid: str, system_info: str = '',
loop: Optional[asyncio.AbstractEventLoop] = None
) -> None:
self._main_loop = loop or asyncio.get_running_loop()
@@ -260,9 +272,14 @@ class MIoTHttpClient:
not isinstance(cloud_server, str)
or not isinstance(client_id, str)
or not isinstance(access_token, str)
or not isinstance(uuid, str)
):
raise MIoTHttpError('invalid params')
self._user_agent = (
f'ha_xiaomi_home/{INTEGRATION_VERSION}'
f' {system_info}'
f' client/ha.{uuid}')
self.update_http_header(
cloud_server=cloud_server, client_id=client_id,
access_token=access_token)
@@ -303,6 +320,7 @@ class MIoTHttpClient:
'Content-Type': 'application/json',
'Authorization': f'Bearer{self._access_token}',
'X-Client-AppId': self._client_id,
'User-Agent': self._user_agent,
}
# pylint: disable=unused-private-member
@@ -367,7 +385,10 @@ class MIoTHttpClient:
url='https://open.account.xiaomi.com/user/profile',
params={
'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
)
@@ -601,15 +622,8 @@ class MIoTHttpClient:
'bssid': device.get('bssid', None),
'order_time': device.get('orderTime', 0),
'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)
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)
if res_obj.get('has_more', False) and next_start_did:
@@ -762,7 +776,18 @@ class MIoTHttpClient:
if not props_buffer:
_LOGGER.error('get prop error, empty request list')
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:
if not all(

View File

@@ -52,17 +52,15 @@ import logging
from homeassistant.helpers.entity import Entity
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_BILLION,
CONCENTRATION_PARTS_PER_MILLION,
DEGREE,
LIGHT_LUX,
PERCENTAGE,
REVOLUTIONS_PER_MINUTE,
SIGNAL_STRENGTH_DECIBELS,
UnitOfBloodGlucoseConcentration,
UnitOfEnergy,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfFrequency,
UnitOfInformation,
UnitOfLength,
UnitOfMass,
@@ -102,9 +100,52 @@ from .miot_spec import (
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__)
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:
"""MIoT Entity Data."""
platform: str
@@ -351,6 +392,18 @@ class MIoTDevice:
f'{ha_domain}.{self._model_strs[0][:9]}_{self.did_tag}_'
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(
self, ha_domain: str, spec_name: str, siid: int, piid: int
) -> str:
@@ -436,7 +489,8 @@ class MIoTDevice:
optional_properties: dict
required_actions: set
optional_actions: set
# 2. The service shall have all required properties, actions.
# 2. The required service shall have all required properties
# and actions.
if service.name in required_services:
required_properties = SPEC_DEVICE_TRANS_MAP[spec_name][
'required'].get(
@@ -454,6 +508,23 @@ class MIoTDevice:
'required'].get(
service.name, {}
).get('optional', {}).get('actions', set({}))
if not {
prop.name for prop in service.properties if prop.access
}.issuperset(set(required_properties.keys())):
return None
if not {
action.name for action in service.actions
}.issuperset(required_actions):
return None
# 3. The required property in required service shall have all
# required access mode.
for prop in service.properties:
if prop.name in required_properties:
if not set(prop.access).issuperset(
required_properties[prop.name]):
return None
# 4. The optional service shall have all required properties
# and actions.
elif service.name in optional_services:
required_properties = SPEC_DEVICE_TRANS_MAP[spec_name][
'optional'].get(
@@ -471,22 +542,23 @@ class MIoTDevice:
'optional'].get(
service.name, {}
).get('optional', {}).get('actions', set({}))
if not {
prop.name for prop in service.properties if prop.access
}.issuperset(set(required_properties.keys())):
continue
if not {
action.name for action in service.actions
}.issuperset(required_actions):
continue
# 5. The required property in optional service shall have all
# required access mode.
for prop in service.properties:
if prop.name in required_properties:
if not set(prop.access).issuperset(
required_properties[prop.name]):
continue
else:
continue
if not {
prop.name for prop in service.properties if prop.access
}.issuperset(set(required_properties.keys())):
return None
if not {
action.name for action in service.actions
}.issuperset(required_actions):
return None
# 3. The required property shall have all required access mode.
for prop in service.properties:
if prop.name in required_properties:
if not set(prop.access).issuperset(
required_properties[prop.name]):
return None
# property
for prop in service.properties:
if prop.name in set.union(
@@ -663,58 +735,66 @@ class MIoTDevice:
def unit_convert(self, spec_unit: str) -> Optional[str]:
"""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,
"percentage": 10042,
"kelvin": 1895,
"rgb": 772, // color
"celsius": 5762,
"none": 16106,
"hours": 1540,
"minutes": 5061,
"ms": 27,
"watt": 216,
"arcdegrees": 159,
"ppm": 177,
"μg/m3": 106,
"days": 571,
"seconds": 2749,
"percentage": 12074,
"none": 11857,
"minutes": 5707,
"celsius": 5767,
"seconds": 3062,
"kelvin": 2511,
"hours": 1380,
"days": 615,
"rgb": 752, // color
"L": 379,
"mg/m3": 335,
"ppm": 182,
"watt": 246,
"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,
"pascal": 110,
"mg/m3": 339,
"lux": 125,
"kWh": 124,
"mv": 2,
"V": 38,
"A": 29,
"mV": 4,
"L": 352,
"m": 37,
"毫摩尔每升": 2, // blood-sugar, cholesterol
"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,
"weeks": 18,
"dB": 17,
"calorie": 18, // 1 cal = 4.184 J
"metre": 15,
"hour": 11,
"cm": 12,
"gram": 8,
"km/h": 8,
"mV": 9,
"times": 4, // exercise-count
"kCal": 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,
"bar": 1,
"megapascal": 1,
"kB": 1,
"mmol/L": 1, // urea
"min/km": 1,
"kilopascal": 1,
"liter": 1,
"cm": 3,
"mA": 2,
"kilogram": 2,
"kcal/d": 2, // basal-metabolism
"times": 1 // exercise-count
"W": 1
}
"""
unit_map = {
@@ -742,11 +822,16 @@ class MIoTDevice:
'L': UnitOfVolume.LITERS,
'liter': UnitOfVolume.LITERS,
'mL': UnitOfVolume.MILLILITERS,
'Hz': UnitOfFrequency.HERTZ,
'calorie': UnitOfEnergy.CALORIE,
'kCal': UnitOfEnergy.KILO_CALORIE,
'km/h': UnitOfSpeed.KILOMETERS_PER_HOUR,
'm/s': UnitOfSpeed.METERS_PER_SECOND,
'watt': UnitOfPower.WATT,
'w': UnitOfPower.WATT,
'W': UnitOfPower.WATT,
'kW': UnitOfPower.KILO_WATT,
'Wh': UnitOfEnergy.WATT_HOUR,
'kWh': UnitOfEnergy.KILO_WATT_HOUR,
'A': UnitOfElectricCurrent.AMPERE,
'mA': UnitOfElectricCurrent.MILLIAMPERE,
@@ -758,6 +843,9 @@ class MIoTDevice:
'meter': UnitOfLength.METERS,
'km': UnitOfLength.KILOMETERS,
'm3/h': UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
'毫摩尔每升': UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
'mmol/L': UnitOfBloodGlucoseConcentration.MILLIMOLE_PER_LITER,
'rpm': REVOLUTIONS_PER_MINUTE,
'gram': UnitOfMass.GRAMS,
'kilogram': UnitOfMass.KILOGRAMS,
'dB': SIGNAL_STRENGTH_DECIBELS,
@@ -769,6 +857,7 @@ class MIoTDevice:
'TB': UnitOfInformation.TERABYTES,
'B/s': UnitOfDataRate.BYTES_PER_SECOND,
'KB/s': UnitOfDataRate.KILOBYTES_PER_SECOND,
'KByte/s': UnitOfDataRate.KILOBYTES_PER_SECOND,
'MB/s': UnitOfDataRate.MEGABYTES_PER_SECOND,
'GB/s': UnitOfDataRate.GIGABYTES_PER_SECOND
}
@@ -841,6 +930,8 @@ class MIoTDevice:
return 'mdi:network'
if spec_unit in {'calorie', 'kCal'}:
return 'mdi:food'
if spec_unit in {'rpm'}:
return 'mdi:fan-clock'
return None
def __gen_sub_id(self) -> int:
@@ -892,19 +983,28 @@ class MIoTServiceEntity(Entity):
self._state_sub_id = 0
self._value_sub_ids = {}
# 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):
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}'
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,
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 = (
f'{"* "if self.entity_data.spec.proprietary else " "}'
f'{self.entity_data.spec.description_trans}')
self._attr_entity_category = entity_data.spec.entity_category
# Set entity attr
self._attr_unique_id = self.entity_id
self._attr_should_poll = False
self._attr_has_entity_name = True
self._attr_available = miot_device.online
@@ -1039,6 +1139,7 @@ class MIoTServiceEntity(Entity):
f'set property failed, property is None, '
f'{self.entity_id}, {self.name}')
value = prop.value_format(value)
value = prop.value_precision(value)
if prop not in self.entity_data.props:
raise RuntimeError(
f'set property failed, unknown property, '
@@ -1076,9 +1177,11 @@ class MIoTServiceEntity(Entity):
'get property failed, not readable, %s, %s, %s',
self.entity_id, self.name, prop.name)
return None
result = prop.value_format(
value: Any = prop.value_format(
await self.miot_device.miot_client.get_prop_async(
did=self.miot_device.did, siid=prop.service.iid, piid=prop.iid))
value = prop.eval_expr(value)
result = prop.value_precision(value)
if result != self._prop_value_map[prop]:
self._prop_value_map[prop] = result
self.async_write_ha_state()
@@ -1108,6 +1211,8 @@ class MIoTServiceEntity(Entity):
):
continue
value: Any = prop.value_format(params['value'])
value = prop.eval_expr(value)
value = prop.value_precision(value)
self._prop_value_map[prop] = value
if prop in self._prop_changed_subs:
self._prop_changed_subs[prop](prop, value)
@@ -1194,11 +1299,15 @@ class MIoTPropertyEntity(Entity):
self._value_sub_id = 0
self._pending_write_ha_state_timer = None
# 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,
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
self._attr_unique_id = self.entity_id
self._attr_should_poll = False
self._attr_has_entity_name = True
self._attr_name = (
@@ -1255,6 +1364,7 @@ class MIoTPropertyEntity(Entity):
f'set property failed, not writable, '
f'{self.entity_id}, {self.name}')
value = self.spec.value_format(value)
value = self.spec.value_precision(value)
try:
await self.miot_device.miot_client.set_prop_async(
did=self.miot_device.did, siid=self.spec.service.iid,
@@ -1272,15 +1382,19 @@ class MIoTPropertyEntity(Entity):
'get property failed, not readable, %s, %s',
self.entity_id, self.name)
return None
return self.spec.value_format(
value: Any = self.spec.value_format(
await self.miot_device.miot_client.get_prop_async(
did=self.miot_device.did, siid=self.spec.service.iid,
piid=self.spec.iid))
value = self.spec.eval_expr(value)
result = self.spec.value_precision(value)
return result
def __on_value_changed(self, params: dict, ctx: Any) -> None:
_LOGGER.debug('property changed, %s', params)
self._value = self.spec.value_format(params['value'])
self._value = self.spec.eval_expr(self._value)
value: Any = self.spec.value_format(params['value'])
value = self.spec.eval_expr(value)
self._value = self.spec.value_precision(value)
if not self._pending_write_ha_state_timer:
self.async_write_ha_state()
@@ -1331,11 +1445,15 @@ class MIoTEventEntity(Entity):
self.service = spec.service
self._main_loop = miot_device.miot_client.main_loop
# 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,
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
self._attr_unique_id = self.entity_id
self._attr_should_poll = False
self._attr_has_entity_name = True
self._attr_name = (
@@ -1442,11 +1560,15 @@ class MIoTActionEntity(Entity):
self._main_loop = miot_device.miot_client.main_loop
self._state_sub_id = 0
# 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,
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
self._attr_unique_id = self.entity_id
self._attr_should_poll = False
self._attr_has_entity_name = True
self._attr_name = (

View File

@@ -232,9 +232,10 @@ class MipsService:
for item in list(self._services.values()):
if item['name'] != name:
continue
service_data = self._services.pop(item['group_id'], {})
self.__call_service_change(
state=MipsServiceState.REMOVED, data=service_data)
# Ignore mdns REMOVED package. Let the connection close by itself.
# service_data = self._services.pop(item['group_id'], {})
# self.__call_service_change(
# state=MipsServiceState.REMOVED, data=service_data)
return
self._main_loop.create_task(
self.__request_service_info_async(zeroconf, service_type, name))

View File

@@ -68,7 +68,11 @@ from paho.mqtt.client import (
# pylint: disable=relative-beyond-top-level
from .common import MIoTMatcher
from .const import UNSUPPORTED_MODELS, MIHOME_MQTT_KEEPALIVE
from .const import (
UNSUPPORTED_MODELS,
MIHOME_MQTT_KEEPALIVE,
DEFAULT_CLOUD_BROKER_HOST
)
from .miot_error import MIoTErrorCode, MIoTMipsError
_LOGGER = logging.getLogger(__name__)
@@ -478,7 +482,7 @@ class _MipsClient(ABC):
self,
payload: Optional[str] = None,
timeout_ms: int = 10000
) -> dict[str, dict]: ...
) -> Optional[dict[str, dict]]: ...
@abstractmethod
async def get_prop_async(
@@ -513,16 +517,14 @@ class _MipsClient(ABC):
"""
self.__thread_check()
if not self._mqtt or not self._mqtt.is_connected():
self.log_error(f'mips sub when not connected, {topic}')
return
try:
if topic not in self._mips_sub_pending_map:
self._mips_sub_pending_map[topic] = 0
if not self._mips_sub_pending_timer:
self._mips_sub_pending_timer = self._internal_loop.call_later(
0.01, self.__mips_sub_internal_pending_handler, topic)
except Exception as err: # pylint: disable=broad-exception-caught
# Catch all exception
self.log_error(f'mips sub internal error, {topic}. {err}')
if topic not in self._mips_sub_pending_map:
self._mips_sub_pending_map[topic] = 0
if not self._mips_sub_pending_timer:
self._mips_sub_pending_timer = self._internal_loop.call_later(
0.01, self.__mips_sub_internal_pending_handler, topic)
@final
def _mips_unsub_internal(self, topic: str) -> None:
@@ -531,6 +533,7 @@ class _MipsClient(ABC):
"""
self.__thread_check()
if not self._mqtt or not self._mqtt.is_connected():
self.log_debug(f'mips unsub when not connected, {topic}')
return
try:
result, mid = self._mqtt.unsubscribe(topic=topic)
@@ -587,6 +590,13 @@ class _MipsClient(ABC):
def __mqtt_loop_handler(self) -> None:
try:
# If the main loop is closed, stop the internal loop immediately
if self.main_loop.is_closed():
self.log_debug(
'The main loop is closed, stop the internal loop.')
if not self._internal_loop.is_closed():
self._internal_loop.stop()
return
if self._mqtt:
self._mqtt.loop_read()
if self._mqtt:
@@ -621,9 +631,10 @@ class _MipsClient(ABC):
ca_certs=self._ca_file,
certfile=self._cert_file,
keyfile=self._key_file)
self._mqtt.tls_insecure_set(True)
else:
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_fail = self.__on_connect_failed
self._mqtt.on_disconnect = self.__on_disconnect
@@ -639,6 +650,7 @@ class _MipsClient(ABC):
_LOGGER.error('__on_connect, but mqtt is None')
return
if not self._mqtt.is_connected():
_LOGGER.error('__on_connect, but mqtt is disconnected')
return
self.log_info(f'mips connect, {flags}, {rc}, {props}')
self.__reset_reconnect_time()
@@ -722,11 +734,16 @@ class _MipsClient(ABC):
self.log_error(f'retry mips sub internal error, {topic}')
continue
subbed_count += 1
result, mid = self._mqtt.subscribe(topic, qos=self.MIPS_QOS)
if result == MQTT_ERR_SUCCESS:
self._mips_sub_pending_map.pop(topic)
self.log_debug(f'mips sub internal success, {topic}')
continue
result = mid = None
try:
result, mid = self._mqtt.subscribe(topic, qos=self.MIPS_QOS)
if result == MQTT_ERR_SUCCESS:
self._mips_sub_pending_map.pop(topic)
self.log_debug(f'mips sub internal success, {topic}')
continue
except Exception as err: # pylint: disable=broad-exception-caught
# Catch all exception
self.log_error(f'mips sub internal error, {topic}. {err}')
self._mips_sub_pending_map[topic] = count+1
self.log_error(
f'retry mips sub internal, {count}, {topic}, {result}, {mid}')
@@ -848,7 +865,8 @@ class MipsCloudClient(_MipsClient):
) -> None:
self._msg_matcher = MIoTMatcher()
super().__init__(
client_id=f'ha.{uuid}', host=f'{cloud_server}-ha.mqtt.io.mi.com',
client_id=f'ha.{uuid}',
host=f'{cloud_server}-{DEFAULT_CLOUD_BROKER_HOST}',
port=port, username=app_id, password=token, loop=loop)
@final
@@ -995,9 +1013,11 @@ class MipsCloudClient(_MipsClient):
did, MIoTDeviceState.ONLINE if msg['event'] == 'online'
else MIoTDeviceState.OFFLINE, ctx)
if did.startswith('blt.'):
# MIoT cloud may not publish BLE device online/offline state message.
# Do not subscribe BLE device online/offline state.
if did.startswith('blt.') or did.startswith('proxy.'):
# MIoT cloud may not publish BLE device or proxy gateway child device
# online/offline state message.
# Do not subscribe BLE device or proxy gateway child device
# online/offline state.
return True
return self.__reg_broadcast_external(
topic=topic, handler=on_state_msg, handler_ctx=handler_ctx)
@@ -1011,7 +1031,7 @@ class MipsCloudClient(_MipsClient):
async def get_dev_list_async(
self, payload: Optional[str] = None, timeout_ms: int = 10000
) -> dict[str, dict]:
) -> Optional[dict[str, dict]]:
raise NotImplementedError('please call in http client')
async def get_prop_async(
@@ -1082,7 +1102,16 @@ class MipsCloudClient(_MipsClient):
if not bc_list:
return
# 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}")
for item in bc_list or []:
if item.handler is None:
@@ -1356,12 +1385,13 @@ class MipsLocalClient(_MipsClient):
@final
async def get_dev_list_async(
self, payload: Optional[str] = None, timeout_ms: int = 10000
) -> dict[str, dict]:
) -> Optional[dict[str, dict]]:
result_obj = await self.__request_async(
topic='proxy/getDevList', payload=payload or '{}',
timeout_ms=timeout_ms)
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 = {}
for did, info in result_obj['devList'].items():
name: str = info.get('name', None)
@@ -1375,19 +1405,9 @@ class MipsLocalClient(_MipsClient):
continue
device_list[did] = {
'did': did,
'name': name,
'urn': urn,
'model': model,
'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),
'push_available': info.get('pushAvailable', False),
'manufacturer': model.split('.')[0],
'push_available': info.get('pushAvailable', False)
}
return device_list

View File

@@ -291,7 +291,7 @@ class MIoTNetwork:
return self._main_loop.time() - start_ts
return self._DETECT_TIMEOUT
except Exception as err: # pylint: disable=broad-exception-caught
print(err)
_LOGGER.debug('ping error, %s',err)
return self._DETECT_TIMEOUT
async def __http_async(self, url: str) -> float:

View File

@@ -66,7 +66,7 @@ class MIoTSpecValueRange:
"""MIoT SPEC value range class."""
min_: int
max_: int
step: int
step: int | float
def __init__(self, value_range: Union[dict, list]) -> None:
if isinstance(value_range, dict):
@@ -567,9 +567,8 @@ class MIoTSpecProperty(_MIoTSpecBase):
return
self._value_range = MIoTSpecValueRange(value_range=value)
if isinstance(value, list):
self.precision = len(str(
value[2]).split('.')[1].rstrip('0')) if '.' in str(
value[2]) else 0
step_: str = format(value[2], '.10f').rstrip('0').rstrip('.')
self.precision = len(step_.split('.')[1]) if '.' in step_ else 0
@property
def value_list(self) -> Optional[MIoTSpecValueList]:
@@ -600,14 +599,28 @@ class MIoTSpecProperty(_MIoTSpecBase):
def value_format(self, value: Any) -> Any:
if value is None:
return None
if self.format_ == int:
return int(round(value))
if self.format_ == float:
return round(value, self.precision)
if isinstance(value, str):
if self.format_ == int:
value = int(float(value))
elif self.format_ == float:
value = float(value)
if self.format_ == bool:
return bool(value in [True, 1, 'True', 'true', '1'])
return value
def value_precision(self, value: Any) -> Any:
if value is None:
return None
if self.format_ == float:
return round(value, self.precision)
if self.format_ == int:
if self.value_range is None:
return int(round(value))
return int(
round((value - self.value_range.min_) / self.value_range.step) *
self.value_range.step + self.value_range.min_)
return value
def dump(self) -> dict:
return {
'type': self.type_,

View File

@@ -90,6 +90,9 @@ translate:
ru:
'false': Ложь
'true': Истина
tr:
'false': Yanlış
'true': Doğru
zh-Hans:
'false': 假
'true': 真
@@ -127,6 +130,9 @@ translate:
ru:
'false': Нет контакта
'true': Контакт
tr:
'false': Temas Yok
'true': Temas
zh-Hans:
'false': 分离
'true': 接触
@@ -164,6 +170,9 @@ translate:
ru:
'false': Движение не обнаружено
'true': Обнаружено движение
tr:
'false': Hareket Algılanmadı
'true': Hareket Algılandı
zh-Hans:
'false': 无人
'true': 有人
@@ -201,6 +210,9 @@ translate:
ru:
'false': Закрыть
'true': Открыть
tr:
'false': Kapalı
'true': Açık
zh-Hans:
'false': 关闭
'true': 开启
@@ -238,6 +250,9 @@ translate:
ru:
'false': Нет
'true': Да
tr:
'false': Hayır
'true': Evet
zh-Hans:
'false': 否
'true': 是

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,9 @@
urn:miot-spec-v2:device:air-conditioner:0000A004:090615-ktf:
services:
- '4'
urn:miot-spec-v2:device:air-conditioner:0000A004:759413-iez:
properties:
- '2.3'
urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-ma4:
properties:
- 9.*
@@ -44,7 +47,23 @@ urn:miot-spec-v2:device:motion-sensor:0000A014:xiaomi-pir1:
services:
- '1'
- '5'
urn:miot-spec-v2:device:speaker:0000A015:xiaomi-l15a:
properties:
- '3.3'
- '6.1'
- '6.2'
- '6.3'
- '6.4'
urn:miot-spec-v2:device:thermostat:0000A031:tofan-wk01:
services:
- '2'
- '4'
urn:miot-spec-v2:device:vacuum:0000A006:narwa-001:
services:
- '*'
urn:miot-spec-v2:device:vacuum:0000A006:narwa-ax11:
services:
- '*'
urn:miot-spec-v2:device:vacuum:0000A006:roidmi-v60:
actions:
- '2.3'

View File

@@ -1,12 +1,58 @@
urn:miot-spec-v2:device:air-condition-outlet:0000A045:lumi-mcn04:1:
prop.3.4:
format: uint8
urn:miot-spec-v2:device:air-conditioner:0000A004:daikin-k2:1:
prop.2.1:
name: ac-on
format: string
access:
- read
- notify
prop.2.2:
name: ac-mode
format: string
access:
- read
- notify
prop.3.1:
name: ac-fan-level
format: string
access:
- read
- 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:
prop.2.2:
value-list:
- value: 1
description: Cool
- value: 2
description: Dry
- value: 4
description: Fan
- value: 8
description: Heat
- value: 9
description: Auto
- value: 10
description: Heat_cool
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c17:1:
prop.10.6:
unit: none
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c17:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c17:1
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c20:1:
prop.10.6:
unit: none
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c20:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c20:1
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c24:1:
prop.8.6:
name: power-consumption
unit: kWh
prop.10.6:
unit: none
@@ -15,6 +61,49 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-c35:1:
prop.10.6:
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-h09h00:4:
prop.10.6:
unit: none
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h40h00:1:
prop.10.6:
unit: none
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h43h00:1:
prop.10.6:
unit: none
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h43h00:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-h43h00:1
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-m16:1:
prop.10.6:
unit: none
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: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: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
@@ -28,6 +117,43 @@ urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mt0:1:
prop.10.6:
unit: none
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mt0:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-mt0:1
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:1:
prop.10.6:
unit: none
prop.3.12:
name: vertical-swing-left-up
prop.3.13:
name: vertical-swing-left-down
prop.3.14:
name: vertical-swing-right-up
prop.3.15:
name: vertical-swing-right-down
prop.3.20:
name: horizontal-swing-left
prop.3.22:
name: horizontal-swing-right
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:2: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:1
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:3: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:1
urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:4: urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-rr0r00:1
urn:miot-spec-v2:device:air-fresh:0000A012:daikin-k33:1:
prop.2.1:
name: ac-on
format: string
access:
- read
- notify
prop.2.3:
name: ac-mode
format: string
access:
- read
- notify
prop.2.5:
name: ac-fan-level
format: string
access:
- read
- notify
urn:miot-spec-v2:device:air-monitor:0000A008:cgllc-cgd1st:1:
prop.3.7:
value-range:
@@ -49,6 +175,8 @@ urn:miot-spec-v2:device:airer:0000A00D:hyd-lyjpro:1:
name: target-position-a
prop.2.9:
name: target-position-b
prop.2.11:
expr: (100-src_value)
urn:miot-spec-v2:device:airer:0000A00D:hyd-znlyj5:1:
prop.2.3:
value-range:
@@ -64,6 +192,19 @@ urn:miot-spec-v2:device:airer:0000A00D:mrbond-m33a:1:
name: current-position-a
prop.2.11:
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:
prop.3.1:
name: mode-a
@@ -80,12 +221,81 @@ urn:miot-spec-v2:device:bath-heater:0000A028:opple-acmoto:1:
description: medium
- value: 255
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:
prop.4.4:
name: fan-level-ventilation
urn:miot-spec-v2:device:curtain:0000A00C:bjkcz-kczble:1:0000D031:
prop.2.2:
name: status-a
urn:miot-spec-v2:device:dehumidifier:0000A02D:xiaomi-lite:1:
prop.3.2:
value-range:
- -30
- 100
- 0.1
urn:miot-spec-v2:device:electronic-valve:0000A0A7:lxzn-02:1:0000C833:
prop.3.1:
format: float
value-range:
- 0
- 999999
- 0.01
expr: (src_value/100)
prop.3.2:
unit: mA
prop.3.3:
format: float
value-range:
- 0
- 65535
- 0.1
expr: (src_value/10)
prop.4.1:
unit: kW
urn:miot-spec-v2:device:electronic-valve:0000A0A7:sanmei-s1:1:
prop.3.1:
format: float
value-range:
- 0
- 99999999
- 0.01
expr: round(src_value/100, 2)
prop.3.2:
format: float
value-range:
- 0
- 16777216
- 0.01
expr: round(src_value/100, 2)
prop.3.3:
format: float
value-range:
- 0
- 65535
- 0.1
expr: round(src_value/10, 1)
urn:miot-spec-v2:device:electronic-valve:0000A0A7:ykcn-cbcs:1:0000C833:
prop.3.1:
format: float
value-range:
- 0
- 99999999
- 0.01
expr: round(src_value/100, 2)
prop.3.2:
unit: mA
prop.3.3:
format: float
value-range:
- 0
- 65535
- 0.1
expr: round(src_value/10, 1)
prop.4.1:
unit: kW
urn:miot-spec-v2:device:fan:0000A005:dmaker-p33:1:
prop.2.2:
name: fan-level-a
@@ -98,15 +308,27 @@ urn:miot-spec-v2:device:fan:0000A005:dmaker-p33:1:
urn:miot-spec-v2:device:fan:0000A005:dmaker-p5:1:
prop.2.4:
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:
prop.2.2:
name: fan-level-a
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p45:1:0000D062:
prop.2.4:
name: fan-level-a
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p51:1:
prop.2.2:
name: fan-level-a
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p69:1:0000D062:
prop.2.4:
name: fan-level-a
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p70:1:0000D062:
prop.2.4:
name: fan-level-a
urn:miot-spec-v2:device:fan:0000A005:xiaomi-p76:1:0000D062:
prop.2.4:
name: fan-level-a
urn:miot-spec-v2:device:fan:0000A005:zhimi-sa1:3:
prop.2.2:
name: fan-level-a
@@ -152,6 +374,12 @@ urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:2: urn:miot-spec-v2:device:hood
urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:3:
prop.3.1:
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:5: urn:miot-spec-v2:device:hood:0000A01B:cykj-jyj22:3
urn:miot-spec-v2:device:humidifier:0000A00E:zhimi-ca4:2:
prop.2.7:
unit: percentage
expr: round(src_value*0.83)
urn:miot-spec-v2:device:kettle:0000A009:yunmi-r3:1:
prop.3.1:
unit: ppm
@@ -172,20 +400,37 @@ urn:miot-spec-v2:device:magnet-sensor:0000A016:linp-m1:1:
description: open
- value: 1
description: closed
expr: src_value!=1
expr: (src_value!=1)
urn:miot-spec-v2:device:motion-sensor:0000A014:lumi-acn001:1:
prop.3.2:
access:
- read
- notify
unit: mV
urn:miot-spec-v2:device:motion-sensor:0000A014:lumi-bmgl01:1:
prop.2.2:
value-list:
- value: 0
description: 0 Seconds
- value: 2
description: 2 Minutes
- value: 5
description: 5 Minutes
urn:miot-spec-v2:device:motor-controller:0000A01D:adp-adswb4:1:0000C837:
prop.2.1:
name: motor-switch
urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:ainice-3b:1: urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:ainice-3b:2
urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:ainice-3b:2:
prop.2.5:
name: people-number
prop.2.8:
name: people-number
prop.2.11:
name: people-number
prop.2.14:
name: people-number
prop.2.17:
name: people-number
urn:miot-spec-v2:device:occupancy-sensor:0000A0BF:izq-24:2:0000C824:
prop.2.6:
unit: cm
@@ -196,26 +441,70 @@ urn:miot-spec-v2:device:outlet:0000A002:chuangmi-212a01:1: urn:miot-spec-v2:devi
urn:miot-spec-v2:device:outlet:0000A002:chuangmi-212a01:2: urn:miot-spec-v2:device:outlet:0000A002:chuangmi-212a01:3
urn:miot-spec-v2:device:outlet:0000A002:chuangmi-212a01:3:
prop.5.1:
expr: round(src_value*6/1000000, 3)
format: float
value-range:
- 0
- 65535
- 0.01
expr: round(src_value*6/1000000, 2)
urn:miot-spec-v2:device:outlet:0000A002:cuco-cp1md:1:
prop.2.2:
name: power-consumption
expr: round(src_value/1000, 3)
format: float
value-range:
- 0
- 65535
- 0.01
expr: round(src_value/1000, 2)
prop.2.3:
format: float
value-range:
- 0
- 3000
- 0.1
expr: round(src_value/10, 1)
prop.2.4:
unit: mA
urn:miot-spec-v2:device:outlet:0000A002:cuco-cp2:1: urn:miot-spec-v2:device:outlet:0000A002:cuco-cp2:2
urn:miot-spec-v2:device:outlet:0000A002:cuco-cp2:2:
prop.2.3:
format: float
value-range:
- 0
- 3000
- 0.1
expr: round(src_value/10, 1)
prop.2.4:
unit: mA
prop.3.2:
format: float
value-range:
- 0
- 65535
- 0.1
expr: round(src_value/10, 1)
urn:miot-spec-v2:device:outlet:0000A002:cuco-cp2d:1:
prop.3.2:
unit: mA
urn:miot-spec-v2:device:outlet:0000A002:cuco-cp7pd:1:
prop.11.1:
unit: Wh
value-range:
- 0
- 65535
- 0.001
expr: (src_value*1000)
prop.11.4:
value-range:
- 0
- 10000
- 0.01
urn:miot-spec-v2:device:outlet:0000A002:cuco-v3:1:
prop.11.1:
name: power-consumption
format: float
value-range:
- 0
- 65535
- 0.01
expr: round(src_value/100, 2)
urn:miot-spec-v2:device:outlet:0000A002:cuco-v3:2: urn:miot-spec-v2:device:outlet:0000A002:cuco-v3:1
urn:miot-spec-v2:device:outlet:0000A002:giot-v8icm:1:0000C816:
@@ -228,11 +517,20 @@ urn:miot-spec-v2:device:outlet:0000A002:qmi-psv3:1:0000C816:
unit: mA
urn:miot-spec-v2:device:outlet:0000A002:yutai-fsov8m:1:0000C816:
prop.4.1:
format: float
value-range:
- 0
- 429497
- 0.01
expr: round(src_value/10000, 2)
urn:miot-spec-v2:device:outlet:0000A002:zimi-zncz01:1:0000C816: urn:miot-spec-v2:device:outlet:0000A002:zimi-zncz01:2:0000C816
urn:miot-spec-v2:device:outlet:0000A002:zimi-zncz01:2:0000C816:
prop.3.1:
name: electric-power
format: float
value-range:
- 0
- 350000
- 0.01
expr: round(src_value/100, 2)
urn:miot-spec-v2:device:plant-monitor:0000A030:hhcc-v1:1:
prop.2.1:
@@ -242,6 +540,17 @@ urn:miot-spec-v2:device:plant-monitor:0000A030:hhcc-v1:1:
name: soil-ec
icon: mdi:sprout-outline
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:
prop.4.1:
unit: kWh
@@ -257,7 +566,30 @@ urn:miot-spec-v2:device:router:0000A036:xiaomi-rd08:1:
urn:miot-spec-v2:device:safe-box:0000A042:loock-v1:1:
prop.5.1:
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:
prop.3.1:
name: playing-state-a
urn:miot-spec-v2:device:switch:0000A003:090615-x1tpm:1:0000D042:
prop.27.3:
name: light-on
@@ -265,10 +597,20 @@ urn:miot-spec-v2:device:switch:0000A003:090615-x1tpm:1:0000D042:
name: light-fan-on
urn:miot-spec-v2:device:switch:0000A003:lxzn-cbcsmj:1:0000D00D:
prop.3.1:
format: float
value-range:
- 0
- 99999999
- 0.01
expr: round(src_value/100, 2)
prop.3.2:
expr: round(src_value/1000, 2)
unit: mA
prop.3.3:
format: float
value-range:
- 0
- 65535
- 0.1
expr: round(src_value/10, 1)
urn:miot-spec-v2:device:thermostat:0000A031:suittc-wk168:1:
prop.2.3:
@@ -305,11 +647,32 @@ urn:miot-spec-v2:device:thermostat:0000A031:suittc-wk168:1:
description: '15'
- value: 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:
prop.4.1:
unit: ppm
prop.4.2:
unit: ppm
urn:miot-spec-v2:device:water-purifier:0000A013:xiaomi-s1200g:1:0000D05A:
prop.3.2:
unit: days
prop.3.3:
unit: days
prop.3.4:
unit: L
prop.3.5:
unit: L
prop.5.2:
unit: days
prop.5.3:
unit: days
prop.5.4:
unit: L
prop.5.5:
unit: L
urn:miot-spec-v2:device:water-purifier:0000A013:xiaomi-s1200g:2:0000D05A: urn:miot-spec-v2:device:water-purifier:0000A013:xiaomi-s1200g:1:0000D05A
urn:miot-spec-v2:device:water-purifier:0000A013:yunmi-s20:1:
prop.4.1:
unit: ppm

View File

@@ -50,11 +50,22 @@ from homeassistant.components.sensor import SensorStateClass
from homeassistant.components.event import EventDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.const import (CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
EntityCategory, LIGHT_LUX, UnitOfEnergy,
from homeassistant.const import (EntityCategory, LIGHT_LUX, UnitOfEnergy,
UnitOfPower, UnitOfElectricCurrent,
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
"""SPEC_DEVICE_TRANS_MAP
@@ -167,8 +178,8 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'battery': {
'required': {
'properties': {
'battery-level': {'read'}
'actions': {
'start-charge'
}
}
}
@@ -325,10 +336,13 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'play-control': {
'required': {
'properties': {
'playing-state': {'read'}
},
'actions': {'play'}
},
'optional': {
'properties': {'playing-state'},
'properties': {'play-loop-mode'},
'actions': {'pause', 'stop', 'next', 'previous'}
}
}
@@ -360,9 +374,49 @@ SPEC_DEVICE_TRANS_MAP: dict = {
},
'optional': {
'play-control': {
'required': {},
'required': {
'properties': {
'playing-state': {'read'}
}
},
'optional': {
'properties': {'playing-state'},
'properties': {'play-loop-mode'},
'actions': {'play', 'pause', 'stop', 'next', 'previous'}
}
}
},
'entity': 'television'
},
'tv-box':{
'required': {
'speaker': {
'required': {
'properties': {
'volume': {'read', 'write'}
}
},
'optional': {
'properties': {'mute'}
}
},
'tv-box': {
'required': {
'actions': {'turn-off'}
},
'optional': {
'actions': {'turn-on'}
}
}
},
'optional': {
'play-control': {
'required': {
'properties': {
'playing-state': {'read'}
}
},
'optional': {
'properties': {'play-loop-mode'},
'actions': {'play', 'pause', 'stop', 'next', 'previous'}
}
}
@@ -599,6 +653,12 @@ SPEC_PROP_TRANS_MAP: dict = {
'entity': 'sensor',
'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': {
'device_class': SensorDeviceClass.BATTERY,
'entity': 'sensor',

View File

@@ -49,7 +49,7 @@ MIoT redirect web pages.
import os
import asyncio
_template = ''
web_template = ''
def _load_page_template():
@@ -57,18 +57,18 @@ def _load_page_template():
os.path.dirname(os.path.abspath(__file__)),
'resource/oauth_redirect_page.html')
with open(path, 'r', encoding='utf-8') as f:
global _template
_template = f.read()
global web_template
web_template = f.read()
async def oauth_redirect_page(
title: str, content: str, button: str, success: bool
) -> str:
"""Return oauth redirect page."""
if _template == '':
if web_template == '':
await asyncio.get_running_loop().run_in_executor(
None, _load_page_template)
web_page = _template.replace('TITLE_PLACEHOLDER', title)
web_page = web_template.replace('TITLE_PLACEHOLDER', title)
web_page = web_page.replace('CONTENT_PLACEHOLDER', content)
web_page = web_page.replace('BUTTON_PLACEHOLDER', button)
web_page = web_page.replace(

View File

@@ -110,7 +110,7 @@ class Sensor(MIoTPropertyEntity, SensorEntity):
self._attr_native_unit_of_measurement = list(
unit_sets)[0] if unit_sets else None
# Set suggested precision
if spec.format_ in {int, float} and spec.expr is None:
if spec.format_ == float:
self._attr_suggested_display_precision = spec.precision
# Set state_class
if spec.state_class:

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Grundkonfiguration",
"description": "### Anmeldegebiet\r\nWählen Sie das Gebiet, in dem sich Ihr Xiaomi Home-Konto befindet. Sie können es in der Xiaomi Home App unter `Mein (unten im Menü) > Weitere Einstellungen > Über Xiaomi Home` überprüfen.\r\n### Sprache\r\nWählen Sie die Sprache, in der Geräte und Entitätsnamen angezeigt werden. Teile von Sätzen, die nicht übersetzt sind, werden in Englisch angezeigt.\r\n### OAuth2-Authentifizierungs-Umleitungs-URL\r\nDie Umleitungs-URL für die OAuth2-Authentifizierung lautet **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant muss im selben lokalen Netzwerk wie das aktuelle Betriebsterminal (z. B. ein persönlicher Computer) und das Betriebsterminal muss über diese Adresse auf die Home Assistant-Homepage zugreifen können. Andernfalls kann die Anmeldeauthentifizierung fehlschlagen.\r\n### 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": {
"cloud_server": "Anmeldegebiet",
"integration_language": "Sprache",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Netzwerkerkennungsadresse",
"check_network_deps": "Überprüfung der Netzwerkabhängigkeiten"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "OAuth2-Authentifizierungs-Umleitungs-URL"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Entitätskonvertierungsregeln aktualisieren",
"update_lan_ctrl_config": "LAN-Steuerungskonfiguration aktualisieren",
"network_detect_config": "Integrierte Netzwerkkonfiguration",
"cover_closed_position": "Die Position der geschlossenen Vorhänge"
"cover_dead_zone_width": "Die Breite des toten Winkels des Vorhangs"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Netzwerkerkennungsadresse",
"check_network_deps": "Überprüfung der Netzwerkabhängigkeiten"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Bestätigen Sie die Konfiguration",
"description": "**{nick_name}**, bitte bestätigen Sie die neuesten Konfigurationsinformationen und klicken Sie dann auf \"Senden\". Die Integration wird mit den aktualisierten Konfigurationen erneut geladen.\r\n\r\nIntegrationsprache:\t{lang_new}\r\nBenutzername:\t{nick_name_new}\r\nAction-Debug-Modus:\t{action_debug}\r\nVerstecke Nicht-Standard-Entitäten:\t{hide_non_standard_entities}\r\nDie Position der geschlossenen Vorhänge:\t{cover_pos_new}\r\nGerätestatusänderungen anzeigen:\t{display_devices_changed_notify}\r\nGeräteänderungen:\t{devices_add} neue Geräte hinzufügen, {devices_remove} Geräte entfernen\r\nKonvertierungsregeländerungen:\tInsgesamt {trans_rules_count} Regeln, aktualisiert {trans_rules_count_success} Regeln",
"description": "**{nick_name}**, bitte bestätigen Sie die neuesten Konfigurationsinformationen und klicken Sie dann auf \"Senden\". Die Integration wird mit den aktualisierten Konfigurationen erneut geladen.\r\n\r\nIntegrationsprache:\t{lang_new}\r\nBenutzername:\t{nick_name_new}\r\nAction-Debug-Modus:\t{action_debug}\r\nVerstecke Nicht-Standard-Entitäten:\t{hide_non_standard_entities}\r\nDie Breite des toten Winkels des Vorhangs:\t{cover_width_new}\r\nGerätestatusänderungen anzeigen:\t{display_devices_changed_notify}\r\nGeräteänderungen:\t{devices_add} neue Geräte hinzufügen, {devices_remove} Geräte entfernen\r\nKonvertierungsregeländerungen:\tInsgesamt {trans_rules_count} Regeln, aktualisiert {trans_rules_count_success} Regeln",
"data": {
"confirm": "Änderungen bestätigen"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Basic configuration",
"description": "### Login Region\r\nSelect the region of your Xiaomi account. You can find it in the Xiaomi Home APP > Profile (located in the menu at the bottom) > Additional settings > About Xiaomi Home.\r\n### Language\r\nSelect the language of the device and entity names. Some sentences without translation will be displayed in English.\r\n### OAuth2 Redirect URL\r\nThe OAuth2 authentication redirect address is **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. The Home Assistant needs to be in the same local area network as the current operating terminal (e.g., the personal computer) and the operating terminal can access the Home Assistant home page through this address. Otherwise, the login authentication may fail.\r\n### 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": {
"cloud_server": "Login Region",
"integration_language": "Language",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Network Detection Address",
"check_network_deps": "Check Network Dependencies"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "OAuth2 Redirect URL"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Update entity conversion rules",
"update_lan_ctrl_config": "Update LAN control configuration",
"network_detect_config": "Integrated network configuration",
"cover_closed_position": "Cover closed position"
"cover_dead_zone_width": "Cover dead zone width"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Network Detection Address",
"check_network_deps": "Check Network Dependencies"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Confirm Configuration",
"description": "Hello **{nick_name}**, please confirm the latest configuration information and then Click SUBMIT.\r\nThe integration will reload using the updated configuration.\r\n\r\nIntegration Language:\t{lang_new}\r\nNickname:\t{nick_name_new}\r\nDebug mode for action:\t{action_debug}\r\nHide non-standard created entities:\t{hide_non_standard_entities}\r\nCover closed position:\t{cover_pos_new}\r\nDisplay device status change notifications:\t{display_devices_changed_notify}\r\nDevice Changes:\tAdd **{devices_add}** devices, Remove **{devices_remove}** devices\r\nTransformation rules change:\tThere are a total of **{trans_rules_count}** rules, and updated **{trans_rules_count_success}** rules",
"description": "Hello **{nick_name}**, please confirm the latest configuration information and then Click SUBMIT.\r\nThe integration will reload using the updated configuration.\r\n\r\nIntegration Language:\t{lang_new}\r\nNickname:\t{nick_name_new}\r\nDebug mode for action:\t{action_debug}\r\nHide non-standard created entities:\t{hide_non_standard_entities}\r\nCover dead zone width:\t{cover_width_new}\r\nDisplay device status change notifications:\t{display_devices_changed_notify}\r\nDevice Changes:\tAdd **{devices_add}** devices, Remove **{devices_remove}** devices\r\nTransformation rules change:\tThere are a total of **{trans_rules_count}** rules, and updated **{trans_rules_count_success}** rules",
"data": {
"confirm": "Confirm the change"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Configuración básica",
"description": "### Región de inicio de sesión\r\nSeleccione la región donde se encuentra su cuenta de Xiaomi. Puede consultar esta información en `Xiaomi Home APP > Yo (ubicado en el menú inferior) > Más ajustes > Acerca de Xiaomi Home`.\r\n### Idioma\r\nSeleccione el idioma utilizado para los nombres de los dispositivos y entidades. Las partes de las frases que no están traducidas se mostrarán en inglés.\r\n### Dirección de redireccionamiento de autenticación de OAuth2\r\nLa dirección de redireccionamiento de autenticación de OAuth2 es **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant debe estar en la misma red local que el terminal de operación actual (por ejemplo, una computadora personal) y el terminal de operación debe poder acceder a la página de inicio de Home Assistant a través de esta dirección, de lo contrario, la autenticación de inicio de sesión podría fallar.\r\n### 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": {
"cloud_server": "Región de inicio de sesión",
"integration_language": "Idioma",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Dirección de Detección de Red",
"check_network_deps": "Verificar Dependencias de Red"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "Dirección de redireccionamiento de autenticación de OAuth2"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Actualizar reglas de conversión de entidad",
"update_lan_ctrl_config": "Actualizar configuración de control LAN",
"network_detect_config": "Configuración de Red Integrada",
"cover_closed_position": "La posición de las cortinas cerradas"
"cover_dead_zone_width": "Anchura del punto ciego de la cortina"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Dirección de Detección de Red",
"check_network_deps": "Verificar Dependencias de Red"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Confirmar configuración",
"description": "¡Hola, **{nick_name}**! Por favor, confirme la última información de configuración y haga clic en \"Enviar\" para finalizar la configuración.\r\nLa integración se volverá a cargar con la nueva configuración.\r\n\r\nIdioma de la integración:\t{lang_new}\r\nApodo de usuario:\t{nick_name_new}\r\nModo de depuración de Action:\t{action_debug}\r\nOcultar entidades generadas no estándar:\t{hide_non_standard_entities}\r\nLa posición de las cortinas cerradas:\t{cover_pos_new}\r\nMostrar notificaciones de cambio de estado del dispositivo:\t{display_devices_changed_notify}\r\nCambios de dispositivos:\t{devices_add} dispositivos agregados, {devices_remove} dispositivos eliminados\r\nCambios en las reglas de conversión:\t{trans_rules_count} reglas en total, {trans_rules_count_success} reglas actualizadas",
"description": "¡Hola, **{nick_name}**! Por favor, confirme la última información de configuración y haga clic en \"Enviar\" para finalizar la configuración.\r\nLa integración se volverá a cargar con la nueva configuración.\r\n\r\nIdioma de la integración:\t{lang_new}\r\nApodo de usuario:\t{nick_name_new}\r\nModo de depuración de Action:\t{action_debug}\r\nOcultar entidades generadas no estándar:\t{hide_non_standard_entities}\r\nAnchura del punto ciego de la cortina:\t{cover_width_new}\r\nMostrar notificaciones de cambio de estado del dispositivo:\t{display_devices_changed_notify}\r\nCambios de dispositivos:\t{devices_add} dispositivos agregados, {devices_remove} dispositivos eliminados\r\nCambios en las reglas de conversión:\t{trans_rules_count} reglas en total, {trans_rules_count_success} reglas actualizadas",
"data": {
"confirm": "Confirmar modificación"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Configuration de base",
"description": "### Région de connexion\r\nSélectionnez la région où se trouve votre compte Xiaomi. Vous pouvez le trouver dans `Xiaomi Home APP > Mon (situé dans le menu inférieur) > Plus de paramètres > À propos de Xiaomi Home`.\r\n### Langue\r\nChoisissez la langue utilisée pour les noms de périphériques et d'entités. Les parties de phrases sans traduction seront affichées en anglais.\r\n### Adresse de redirection de l'authentification OAuth2\r\nL'adresse de redirection de l'authentification OAuth2 est **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant doit être dans le même réseau local que le terminal de l'opération actuelle (par exemple, un ordinateur personnel) et le terminal de l'opération doit pouvoir accéder à la page d'accueil de Home Assistant via cette adresse. Sinon, l'authentification de connexion peut échouer.\r\n### 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": {
"cloud_server": "Région de connexion",
"integration_language": "Langue",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Adresse de Détection Réseau",
"check_network_deps": "Vérification des Dépendances Réseau"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "Adresse de redirection de l'authentification"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Mettre à jour les règles de conversion d'entités",
"update_lan_ctrl_config": "Mettre à jour la configuration de contrôle LAN",
"network_detect_config": "Configuration Réseau Intégrée",
"cover_closed_position": "La position des rideaux fermés"
"cover_dead_zone_width": "Largeur de la zone aveugle du rideau"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Adresse de Détection Réseau",
"check_network_deps": "Vérification des Dépendances Réseau"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Confirmer la configuration",
"description": "**{nick_name}** Bonjour ! Veuillez confirmer les dernières informations de configuration et cliquer sur \"Soumettre\".\r\nL'intégration rechargera avec la nouvelle configuration.\r\n\r\nLangue d'intégration : {lang_new}\r\nPseudo utilisateur : {nick_name_new}\r\nMode de débogage d'action : {action_debug}\r\nMasquer les entités générées non standard : {hide_non_standard_entities}\r\nLa position des rideaux fermés:\t{cover_pos_new}\r\nAfficher les notifications de changement d'état de l'appareil:\t{display_devices_changed_notify}\r\nModifications des appareils : Ajouter **{devices_add}** appareils, supprimer **{devices_remove}** appareils\r\nModifications des règles de conversion : **{trans_rules_count}** règles au total, mise à jour de **{trans_rules_count_success}** règles",
"description": "**{nick_name}** Bonjour ! Veuillez confirmer les dernières informations de configuration et cliquer sur \"Soumettre\".\r\nL'intégration rechargera avec la nouvelle configuration.\r\n\r\nLangue d'intégration : {lang_new}\r\nPseudo utilisateur : {nick_name_new}\r\nMode de débogage d'action : {action_debug}\r\nMasquer les entités générées non standard : {hide_non_standard_entities}\r\nLargeur de la zone aveugle du rideau:\t{cover_width_new}\r\nAfficher les notifications de changement d'état de l'appareil:\t{display_devices_changed_notify}\r\nModifications des appareils : Ajouter **{devices_add}** appareils, supprimer **{devices_remove}** appareils\r\nModifications des règles de conversion : **{trans_rules_count}** règles au total, mise à jour de **{trans_rules_count_success}** règles",
"data": {
"confirm": "Confirmer la modification"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"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": {
"cloud_server": "Regione di Login",
"integration_language": "Lingua",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Indirizzo di Rilevamento della Rete",
"check_network_deps": "Controlla le Dipendenze di Rete"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "URL di reindirizzamento OAuth2"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Aggiorna le regole di conversione delle entità",
"update_lan_ctrl_config": "Aggiorna configurazione del controllo LAN",
"network_detect_config": "Configurazione di Rete Integrata",
"cover_closed_position": "La posizione delle tende chiuse"
"cover_dead_zone_width": "Larghezza dell’angolo cieco della tenda"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Indirizzo di Rilevamento della Rete",
"check_network_deps": "Controlla le Dipendenze di Rete"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Conferma Configurazione",
"description": "Ciao **{nick_name}**, si prega di confermare le informazioni di configurazione più recenti e poi fare clic su INVIA.\r\nL'integrazione verrà ricaricata utilizzando la configurazione aggiornata.\r\n\r\nLingua dell'Integrazione:\t{lang_new}\r\nSoprannome:\t{nick_name_new}\r\nModalità di debug per azione:\t{action_debug}\r\nNascondi entità create non standard:\t{hide_non_standard_entities}\r\nLa posizione delle tende chiuse:\t{cover_pos_new}\r\nMostra notifiche di cambio stato del dispositivo:\t{display_devices_changed_notify}\r\nCambiamenti del Dispositivo:\tAggiungi **{devices_add}** dispositivi, Rimuovi **{devices_remove}** dispositivi\r\nCambiamenti delle regole di trasformazione:\tCi sono un totale di **{trans_rules_count}** regole, e aggiornate **{trans_rules_count_success}** regole",
"description": "Ciao **{nick_name}**, si prega di confermare le informazioni di configurazione più recenti e poi fare clic su INVIA.\r\nL'integrazione verrà ricaricata utilizzando la configurazione aggiornata.\r\n\r\nLingua dell'Integrazione:\t{lang_new}\r\nSoprannome:\t{nick_name_new}\r\nModalità di debug per azione:\t{action_debug}\r\nNascondi entità create non standard:\t{hide_non_standard_entities}\r\nLarghezza dell’angolo cieco della tenda:\t{cover_width_new}\r\nMostra notifiche di cambio stato del dispositivo:\t{display_devices_changed_notify}\r\nCambiamenti del Dispositivo:\tAggiungi **{devices_add}** dispositivi, Rimuovi **{devices_remove}** dispositivi\r\nCambiamenti delle regole di trasformazione:\tCi sono un totale di **{trans_rules_count}** regole, e aggiornate **{trans_rules_count_success}** regole",
"data": {
"confirm": "Conferma la modifica"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "基本設定",
"description": "### ログインエリア\r\nXiaomi アカウントが属する地域を選択します。 `Xiaomi Home アプリ> マイ(ボトムメニューにあります)> その他の設定> Xiaomi Home について` で確認できます。\r\n### 言語\r\nデバイスおよびエンティティ名に使用される言語を選択します。一部の翻訳が欠落している場合、英語が表示されます。\r\n### OAuth2 認証リダイレクトアドレス\r\nOAuth2 認証リダイレクトアドレスは **[http://homeassistant.local:8123](http://homeassistant.local:8123)** です。Home Assistant は、現在の操作端末(たとえば、パーソナルコンピュータ)と同じ LAN 内にあり、操作端末がこのアドレスで Home Assistant ホームページにアクセスできる場合にのみログイン認証が成功する場合があります。\r\n### 統合ネットワーク構成\r\nローカルネットワークが正常に機能しているかどうか、および関連するネットワークリソースにアクセスできるかどうかを確認します。**初めて追加する場合は、これを選択することをお勧めします。**\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": {
"cloud_server": "ログインエリア",
"integration_language": "言語",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"title": "統合ネットワーク構成",
"description": "## 使用方法の紹介\r\n### ネットワーク検出アドレス\r\nネットワークが正常に機能しているかどうかを確認するために使用されます。設定されていない場合、システムのデフォルトアドレスが使用されます。デフォルトアドレスのチェックが失敗した場合は、カスタムアドレスを入力してみてください。\r\n- 複数の検出アドレスを入力できます。アドレスはコンマで区切ります。例:`8.8.8.8,https://www.bing.com`\r\n- IPアドレスの場合、pingによる検出が行われます。HTTP(s)アドレスの場合、HTTP GETリクエストによる検出が行われます。\r\n- システムのデフォルト検出アドレスを復元する場合は、カンマ `,` を入力して「次へ」をクリックしてください。\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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "ネットワーク検出アドレス",
"check_network_deps": "ネットワーク依存関係のチェック"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "認証リダイレクトアドレス"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "エンティティ変換ルールを更新する",
"update_lan_ctrl_config": "LAN制御構成を更新する",
"network_detect_config": "統合ネットワーク構成",
"cover_closed_position": "カーテンを閉じた位置"
"cover_dead_zone_width": "カーテンの死角幅"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"title": "統合ネットワーク構成",
"description": "## 使用方法の紹介\r\n### ネットワーク検出アドレス\r\nネットワークが正常に機能しているかどうかを確認するために使用されます。設定されていない場合、システムのデフォルトアドレスが使用されます。デフォルトアドレスのチェックが失敗した場合は、カスタムアドレスを入力してみてください。\r\n- 複数の検出アドレスを入力できます。アドレスはコンマで区切ります。例:`8.8.8.8,https://www.bing.com`\r\n- IPアドレスの場合、pingによる検出が行われます。HTTP(s)アドレスの場合、HTTP GETリクエストによる検出が行われます。\r\n- システムのデフォルト検出アドレスを復元する場合は、カンマ `,` を入力して「次へ」をクリックしてください。\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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "ネットワーク検出アドレス",
"check_network_deps": "ネットワーク依存関係のチェック"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "構成を確認する",
"description": "**{nick_name}** さん、こんにちは! 最新の構成情報を確認してください。[送信] をクリックして、更新された構成を使用して再度読み込みます。\r\n\r\n統合言語:\t{lang_new}\r\nユーザー名:\t{nick_name_new}\r\nAction デバッグモード:\t{action_debug}\r\n非標準生成エンティティを非表示にする:\t{hide_non_standard_entities}\r\nカーテンを閉じた位置:\t{cover_pos_new}\r\nデバイスの状態変化通知を表示:\t{display_devices_changed_notify}\r\nデバイス変更:\t追加 **{devices_add}** 個のデバイス、削除 **{devices_remove}** 個のデバイス\r\n変換ルール変更:\t合計 **{trans_rules_count}** 個の規則、更新 **{trans_rules_count_success}** 個の規則",
"description": "**{nick_name}** さん、こんにちは! 最新の構成情報を確認してください。[送信] をクリックして、更新された構成を使用して再度読み込みます。\r\n\r\n統合言語:\t{lang_new}\r\nユーザー名:\t{nick_name_new}\r\nAction デバッグモード:\t{action_debug}\r\n非標準生成エンティティを非表示にする:\t{hide_non_standard_entities}\r\nカーテンの死角幅:\t{cover_width_new}\r\nデバイスの状態変化通知を表示:\t{display_devices_changed_notify}\r\nデバイス変更:\t追加 **{devices_add}** 個のデバイス、削除 **{devices_remove}** 個のデバイス\r\n変換ルール変更:\t合計 **{trans_rules_count}** 個の規則、更新 **{trans_rules_count_success}** 個の規則",
"data": {
"confirm": "変更を確認する"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Basisconfiguratie",
"description": "### Inlogregio\r\nSelecteer de regio van uw Xiaomi-account. U kunt deze vinden in de Xiaomi Home APP > Profiel (onderin het menu) > Extra instellingen > Over Xiaomi Home.\r\n### Taal\r\nKies de taal voor de apparaats- en entiteitsnamen. Sommige zinnen zonder vertaling worden in het Engels weergegeven.\r\n### OAuth2 Omleidings-URL\r\nHet OAuth2 authenticatie omleidingsadres is **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. Home Assistant moet zich in hetzelfde lokale netwerk bevinden als de huidige werkterminal (bijv. de persoonlijke computer) en de werkterminal moet toegang hebben tot de startpagina van Home Assistant via dit adres. Anders kan de inlogauthenticatie mislukken.\r\n### 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": {
"cloud_server": "Inlogregio",
"integration_language": "Taal",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Netwerkdetectieadres",
"check_network_deps": "Controleer Netwerkafhankelijkheden"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "OAuth2 Omleidings-URL"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Werk entiteitsconversieregels bij",
"update_lan_ctrl_config": "Werk LAN controleconfiguratie bij",
"network_detect_config": "Geïntegreerde Netwerkconfiguratie",
"cover_closed_position": "De positie van de gesloten gordijnen"
"cover_dead_zone_width": "Breedte van de dode hoek van het gordijn"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Netwerkdetectieadres",
"check_network_deps": "Controleer Netwerkafhankelijkheden"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Bevestig Configuratie",
"description": "Hallo **{nick_name}**, bevestig alstublieft de nieuwste configuratie-informatie en klik vervolgens op INDENKEN.\r\nDe integratie zal opnieuw laden met de bijgewerkte configuratie.\r\n\r\nIntegratietaal:\t{lang_new}\r\nBijnaam:\t{nick_name_new}\r\nDebugmodus voor actie:\t{action_debug}\r\nVerberg niet-standaard gemaakte entiteiten:\t{hide_non_standard_entities}\r\nDe positie van de gesloten gordijnen:\t{cover_pos_new}\r\nApparaatstatuswijzigingen weergeven:\t{display_devices_changed_notify}\r\nWijzigingen in apparaten:\tVoeg **{devices_add}** apparaten toe, Verwijder **{devices_remove}** apparaten\r\nWijzigingen in transformateregels:\tEr zijn in totaal **{trans_rules_count}** regels, en **{trans_rules_count_success}** regels zijn bijgewerkt",
"description": "Hallo **{nick_name}**, bevestig alstublieft de nieuwste configuratie-informatie en klik vervolgens op INDENKEN.\r\nDe integratie zal opnieuw laden met de bijgewerkte configuratie.\r\n\r\nIntegratietaal:\t{lang_new}\r\nBijnaam:\t{nick_name_new}\r\nDebugmodus voor actie:\t{action_debug}\r\nVerberg niet-standaard gemaakte entiteiten:\t{hide_non_standard_entities}\r\nBreedte van de dode hoek van het gordijn:\t{cover_width_new}\r\nApparaatstatuswijzigingen weergeven:\t{display_devices_changed_notify}\r\nWijzigingen in apparaten:\tVoeg **{devices_add}** apparaten toe, Verwijder **{devices_remove}** apparaten\r\nWijzigingen in transformateregels:\tEr zijn in totaal **{trans_rules_count}** regels, en **{trans_rules_count_success}** regels zijn bijgewerkt",
"data": {
"confirm": "Bevestig de wijziging"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Configuração básica",
"description": "### Região de Login\r\nSelecione a região da sua conta Xiaomi. Você pode encontrá-la no aplicativo Xiaomi Home > Perfil (localizado no menu inferior) > Configurações adicionais > Sobre o Xiaomi Home.\r\n### Idioma\r\nSelecione o idioma dos nomes dos dispositivos e entidades. Algumas frases sem tradução serão exibidas em inglês.\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento da autenticação OAuth2 é **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. O Home Assistant precisa estar na mesma rede local que o terminal atual (por exemplo, o computador pessoal) e o terminal precisa acessar a página inicial do Home Assistant através desse endereço. Caso contrário, a autenticação de login pode falhar.\r\n### 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": {
"cloud_server": "Região de Login",
"integration_language": "Idioma",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"title": "Configuração de Detecção de Rede",
"description": "## Introdução ao Uso\r\n### Endereço de Detecção de Rede\r\nUsado para verificar se a rede está funcionando corretamente. Se não for definido, o endereço padrão do sistema será usado. Se a verificação do endereço padrão falhar, você pode tentar inserir um endereço personalizado.\r\n- Você pode inserir vários endereços de detecção, separados por vírgulas, como `8.8.8.8,https://www.bing.com`\r\n- Se for um endereço IP, a detecção será feita via ping. Se for um endereço HTTP(s), a detecção será feita via solicitação HTTP GET.\r\n- 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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Endereço de Detecção de Rede",
"check_network_deps": "Verificar Dependências de Rede"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Atualizar regras de conversão de entidades",
"update_lan_ctrl_config": "Atualizar configuração de controle LAN",
"network_detect_config": "Configuração de Rede Integrada",
"cover_closed_position": "A posição das cortinas fechadas"
"cover_dead_zone_width": "Largura da área cega da cortina"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"title": "Configuração de Detecção de Rede",
"description": "## Introdução ao Uso\r\n### Endereço de Detecção de Rede\r\nUsado para verificar se a rede está funcionando corretamente. Se não for definido, o endereço padrão do sistema será usado. Se a verificação do endereço padrão falhar, você pode tentar inserir um endereço personalizado.\r\n- Você pode inserir vários endereços de detecção, separados por vírgulas, como `8.8.8.8,https://www.bing.com`\r\n- Se for um endereço IP, a detecção será feita via ping. Se for um endereço HTTP(s), a detecção será feita via solicitação HTTP GET.\r\n- 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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Endereço de Detecção de Rede",
"check_network_deps": "Verificar Dependências de Rede"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Confirmar Configuração",
"description": "Olá **{nick_name}**, confirme as informações da configuração mais recente e depois clique em ENVIAR.\r\nA integração será recarregada com a configuração atualizada.\r\n\r\nIdioma da Integração:\t{lang_new}\r\nApelido:\t{nick_name_new}\r\nModo de depuração para ação:\t{action_debug}\r\nOcultar entidades não padrão criadas:\t{hide_non_standard_entities}\r\nA posição das cortinas fechadas:\t{cover_pos_new}\r\nExibir notificações de mudança de status do dispositivo:\t{display_devices_changed_notify}\r\nAlterações de Dispositivos:\tAdicionar **{devices_add}** dispositivos, Remover **{devices_remove}** dispositivos\r\nAlteração nas Regras de Transformação:\tUm total de **{trans_rules_count}** regras, e **{trans_rules_count_success}** regras atualizadas",
"description": "Olá **{nick_name}**, confirme as informações da configuração mais recente e depois clique em ENVIAR.\r\nA integração será recarregada com a configuração atualizada.\r\n\r\nIdioma da Integração:\t{lang_new}\r\nApelido:\t{nick_name_new}\r\nModo de depuração para ação:\t{action_debug}\r\nOcultar entidades não padrão criadas:\t{hide_non_standard_entities}\r\nLargura da área cega da cortina:\t{cover_width_new}\r\nExibir notificações de mudança de status do dispositivo:\t{display_devices_changed_notify}\r\nAlterações de Dispositivos:\tAdicionar **{devices_add}** dispositivos, Remover **{devices_remove}** dispositivos\r\nAlteração nas Regras de Transformação:\tUm total de **{trans_rules_count}** regras, e **{trans_rules_count_success}** regras atualizadas",
"data": {
"confirm": "Confirmar a mudança"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "Configuração Básica",
"description": "### Região de Login\r\nSelecione a região da sua conta Xiaomi. Pode encontrá-la na aplicação Xiaomi Home > Perfil (menu inferior) > Configurações adicionais > Sobre o Xiaomi Home.\r\n### Idioma\r\nSelecione o idioma para os nomes de dispositivos e entidades. Algumas frases sem tradução serão apresentadas em inglês.\r\n### URL de Redirecionamento OAuth2\r\nO endereço de redirecionamento para a autenticação OAuth2 é **[http://homeassistant.local:8123](http://homeassistant.local:8123)**. O Home Assistant deve estar na mesma rede local que o terminal atual (por exemplo, o computador pessoal) e esse terminal deve conseguir aceder à página inicial do Home Assistant através deste endereço. Caso contrário, a autenticação de login pode falhar.\r\n### 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": {
"cloud_server": "Região de Login",
"integration_language": "Idioma",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Endereço de Detecção de Rede",
"check_network_deps": "Verificar Dependências de Rede"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "URL de Redirecionamento OAuth2"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "Atualizar regras de conversão de entidades",
"update_lan_ctrl_config": "Atualizar configuração de controlo LAN",
"network_detect_config": "Configuração de Rede Integrada",
"cover_closed_position": "A posição das cortinas fechadas"
"cover_dead_zone_width": "Largura da zona cega da cortina"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Endereço de Detecção de Rede",
"check_network_deps": "Verificar Dependências de Rede"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Confirmar Configuração",
"description": "Olá **{nick_name}**, confirme a informação da configuração mais recente e depois clique em SUBMETER.\r\nA integração será recarregada com a configuração atualizada.\r\n\r\nIdioma da Integração:\t{lang_new}\r\nAlcunha:\t{nick_name_new}\r\nModo de depuração de ação:\t{action_debug}\r\nOcultar entidades não padrão:\t{hide_non_standard_entities}\r\nA posição das cortinas fechadas:\t{cover_pos_new}\r\nExibir notificações de mudança de status do dispositivo:\t{display_devices_changed_notify}\r\nAlterações aos Dispositivos:\tAdicionar **{devices_add}** dispositivos, Remover **{devices_remove}** dispositivos\r\nAlteração das Regras de Transformação:\tExistem **{trans_rules_count}** regras no total, com **{trans_rules_count_success}** regras atualizadas",
"description": "Olá **{nick_name}**, confirme a informação da configuração mais recente e depois clique em SUBMETER.\r\nA integração será recarregada com a configuração atualizada.\r\n\r\nIdioma da Integração:\t{lang_new}\r\nAlcunha:\t{nick_name_new}\r\nModo de depuração de ação:\t{action_debug}\r\nOcultar entidades não padrão:\t{hide_non_standard_entities}\r\nLargura da zona cega da cortina:\t{cover_width_new}\r\nExibir notificações de mudança de status do dispositivo:\t{display_devices_changed_notify}\r\nAlterações aos Dispositivos:\tAdicionar **{devices_add}** dispositivos, Remover **{devices_remove}** dispositivos\r\nAlteração das Regras de Transformação:\tExistem **{trans_rules_count}** regras no total, com **{trans_rules_count_success}** regras atualizadas",
"data": {
"confirm": "Confirmar a alteração"
}

View File

@@ -21,7 +21,7 @@
},
"network_detect_config": {
"title": "Интегрированная Сетевая Конфигурация",
"description": "## Введение в Использование\r\n### Адрес Обнаружения Сети\r\nИспользуется для проверки работоспособности сети. Если не задано, будет использоваться адрес по умолчанию. Если проверка адреса по умолчанию не удалась, вы можете попробовать ввести пользовательский адрес.\r\n- Вы можете ввести несколько адресов для проверки, разделенных запятыми, например `8.8.8.8,https://www.bing.com`\r\n- Если это IP-адрес, проверка будет выполняться с помощью ping. Если это HTTP(s)-адрес, проверка будет выполняться с помощью HTTP GET запроса.\r\n- Если вы хотите восстановить адрес обнаружения по умолчанию, введите запятую `,` и нажмите 'Далее'.\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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Адрес Обнаружения Сети",
"check_network_deps": "Проверка Сетевых Зависимостей"
@@ -125,7 +125,7 @@
"update_trans_rules": "Обновить правила преобразования сущностей",
"update_lan_ctrl_config": "Обновить конфигурацию управления LAN",
"network_detect_config": "Интегрированная Сетевая Конфигурация",
"cover_closed_position": "Положение закрытых штор"
"cover_dead_zone_width": "Ширина «мертвой зоны» шторы"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"title": "Интегрированная Сетевая Конфигурация",
"description": "## Введение в Использование\r\n### Адрес Обнаружения Сети\r\nИспользуется для проверки работоспособности сети. Если не задано, будет использоваться адрес по умолчанию. Если проверка адреса по умолчанию не удалась, вы можете попробовать ввести пользовательский адрес.\r\n- Вы можете ввести несколько адресов для проверки, разделенных запятыми, например `8.8.8.8,https://www.bing.com`\r\n- Если это IP-адрес, проверка будет выполняться с помощью ping. Если это HTTP(s)-адрес, проверка будет выполняться с помощью HTTP GET запроса.\r\n- Если вы хотите восстановить адрес обнаружения по умолчанию, введите запятую `,` и нажмите 'Далее'.\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://{cloud_server}-ha.mqtt.io.mi.com:8883`.",
"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": {
"network_detect_addr": "Адрес Обнаружения Сети",
"check_network_deps": "Проверка Сетевых Зависимостей"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "Подтверждение настройки",
"description": "**{nick_name}** Здравствуйте! Подтвердите последнюю информацию о настройке и нажмите «Отправить». Интеграция будет перезагружена с использованием обновленных настроек.\r\n\r\nЯзык интеграции:\t{lang_new}\r\nИмя пользователя:\t{nick_name_new}\r\nРежим отладки Action:\t{action_debug}\r\nСкрыть непроизводственные сущности:\t{hide_non_standard_entities}\r\nПоложение закрытых штор:\t{cover_pos_new}\r\nОтображать уведомления о изменении состояния устройства:\t{display_devices_changed_notify}\r\nИзменение устройства:\tДобавлено **{devices_add}** устройство, удалено **{devices_remove}** устройства\r\nИзменение правил преобразования:\tВсего **{trans_rules_count}** правил, обновлено **{trans_rules_count_success}** правил",
"description": "**{nick_name}** Здравствуйте! Подтвердите последнюю информацию о настройке и нажмите «Отправить». Интеграция будет перезагружена с использованием обновленных настроек.\r\n\r\nЯзык интеграции:\t{lang_new}\r\nИмя пользователя:\t{nick_name_new}\r\nРежим отладки Action:\t{action_debug}\r\nСкрыть непроизводственные сущности:\t{hide_non_standard_entities}\r\nШирина «мертвой зоны» шторы:\t{cover_width_new}\r\nОтображать уведомления о изменении состояния устройства:\t{display_devices_changed_notify}\r\nИзменение устройства:\tДобавлено **{devices_add}** устройство, удалено **{devices_remove}** устройства\r\nИзменение правил преобразования:\tВсего **{trans_rules_count}** правил, обновлено **{trans_rules_count_success}** правил",
"data": {
"confirm": "Подтвердить изменения"
}

View File

@@ -0,0 +1,225 @@
{
"config": {
"flow_title": "Xiaomi Home Entegrasyonu",
"step": {
"eula": {
"title": "Risk Bildirimi",
"description": "1. Xiaomi kullanıcı bilgileriniz ve cihaz bilgileriniz Home Assistant sisteminde saklanacaktır. **Xiaomi, Home Assistant depolama mekanizmasının güvenliğini garanti edemez**. Bilgilerinizin çalınmasını önlemekten siz sorumlusunuz.\r\n2. Bu entegrasyon açık kaynak topluluğu tarafından sürdürülmektedir. Kararlılık sorunları veya diğer sorunlar olabilir. Bu entegrasyonla ilgili sorunlar veya hatalarla karşılaştığınızda, **Xiaomi müşteri hizmetleriyle iletişime geçmek yerine açık kaynak topluluğundan yardım istemelisiniz**.\r\n3. Yerel işletim ortamınızı sürdürmek için teknik beceriye ihtiyacınız vardır. Entegrasyon yeni başlayanlar için kullanıcı dostu değildir.\r\n4. Lütfen başlamadan önce README dosyasını okuyun.\n\n5. Entegrasyonun kararlı kullanımını sağlamak ve arayüz kötüye kullanımını önlemek için, **bu entegrasyonun yalnızca Home Assistant'ta kullanılmasına izin verilir. Ayrıntılar için lütfen LICENSE'a bakın**.",
"data": {
"eula": "Yukarıdaki risklerin farkındayım ve entegrasyonun kullanımıyla ilişkili tüm riskleri gönüllü olarak üstlenmeye razıyım."
}
},
"auth_config": {
"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 **[{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": {
"cloud_server": "Giriş Bölgesi",
"integration_language": "Dil",
"oauth_redirect_url": "OAuth2 Yönlendirme URL'si",
"network_detect_config": "Entegre Ağ Yapılandırması"
}
},
"network_detect_config": {
"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,{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": {
"network_detect_addr": "Ağ Algılama Adresi",
"check_network_deps": "Ağ Bağımlılıklarını Kontrol Et"
}
},
"oauth_error": {
"title": "Giriş Hatası",
"description": "Tekrar denemek için İLERİ'ye tıklayın."
},
"homes_select": {
"title": "Ev ve Cihaz Seçimi",
"description": "## Tanıtım\r\n### Cihazın Evini İçe Aktar\r\nEntegrasyon, seçilen evden cihazları ekleyecektir.\r\n### Oda Adı Senkronizasyon Modu\r\nMi Home UYGULAMASINDAN Home Assistant'a cihazlar senkronize edilirken, Home Assistant'taki alanın adlandırılması aşağıdaki kurallara uyacaktır. Senkronizasyon işleminin Mi Home UYGULAMASINDAKI ev ve oda ayarlarını değiştirmeyeceğini unutmayın.\r\n- Senkronize etme: Cihaz herhangi bir alana eklenmeyecektir.\r\n- Diğer seçenekler: Cihazın eklendiği alan, Mi Home UYGULAMASINDAKI ev veya oda adına göre adlandırılacaktır.\r\n### Gelişmiş Ayarlar\r\nEntegrasyonun profesyonel yapılandırma seçeneklerini değiştirmek için gelişmiş ayarları gösterin.\r\n\r\n&emsp;\r\n### {nick_name} Merhaba! Lütfen cihaz eklemek istediğiniz evi seçin.",
"data": {
"home_infos": "Cihazın Evini İçe Aktar",
"area_name_rule": "Oda Adı Senkronizasyon Modu",
"advanced_options": "Gelişmiş Ayarlar"
}
},
"advanced_options": {
"title": "Gelişmiş Ayarlar",
"description": "## Tanıtım\r\n### Aşağıdaki seçeneklerin anlamını çok net bir şekilde bilmiyorsanız, lütfen varsayılan ayarları koruyun.\r\n### Cihazları Filtrele\r\nCihazları oda adı ve cihaz türüne göre filtrelemeyi destekler, ayrıca cihaz boyutu filtrelemesini de destekler.\r\n### Kontrol Modu\r\n- Otomatik: Yerel ağda kullanılabilir bir Xiaomi merkezi hub ağ geçidi olduğunda, Home Assistant cihaz kontrol komutlarını öncelikle merkezi hub ağ geçidi üzerinden göndererek yerel kontrolü sağlar. Yerel ağda merkezi hub ağ geçidi yoksa, Xiaomi OT protokolü üzerinden kontrol komutları göndermeye çalışır. Yalnızca yukarıdaki yerel kontrol koşulları karşılanmadığında, cihaz kontrol komutları bulut üzerinden gönderilir.\r\n- Bulut: Tüm kontrol komutları bulut üzerinden gönderilir.\r\n### Eylem Hata Ayıklama Modu\r\nCihaz MIoT-Spec-V2 tarafından tanımlanan yöntemler için, bildirim varlıkları oluşturmaya ek olarak, bir metin girişi kutusu varlığı da oluşturulacaktır. Hata ayıklama sırasında cihaza kontrol komutları göndermek için bunu kullanabilirsiniz.\r\n### Standart Olmayan Oluşturulan Varlıkları Gizle\r\nAdı \"*\" ile başlayan standart olmayan MIoT-Spec-V2 örnekleri tarafından oluşturulan varlıkları gizle.\r\n### İkili Sensör Görüntüleme Modu\r\nXiaomi Home'daki ikili sensörleri metin sensör varlığı veya ikili sensör varlığı olarak görüntüleyin.\r\n### Cihaz Durum Değişikliği Bildirimlerini Göster\r\nDetaylı cihaz durum değişikliği bildirimlerini görüntüleyin, yalnızca seçilen bildirimleri gösterin.",
"data": {
"devices_filter": "Cihazları Filtrele",
"ctrl_mode": "Kontrol Modu",
"action_debug": "Eylem Hata Ayıklama Modu",
"hide_non_standard_entities": "Standart Olmayan Oluşturulan Varlıkları Gizle",
"display_binary_mode": "İkili Sensör Görüntüleme Modu",
"display_devices_changed_notify": "Cihaz Durum Değişikliği Bildirimlerini Göster"
}
},
"devices_filter": {
"title": "Cihazları Filtrele",
"description": "## Kullanım Talimatları\r\nCihazları ev oda adı, cihaz erişim türü ve cihaz modeline göre filtrelemeyi destekler, ayrıca cihaz boyutu filtrelemesini de destekler. Filtreleme mantığı aşağıdaki gibidir:\r\n- İlk olarak, istatistik mantığına göre, dahil edilen tüm öğelerin birleşimini veya kesişimini alın, ardından hariç tutulan öğelerin kesişimini veya birleşimini alın ve son olarak [hariç tutulan özet sonucu]ndan [dahil edilen özet sonucu]nu çıkararak [filtre sonucu]nu elde edin.\r\n- Dahil edilen öğe seçilmemişse, tümünün dahil edildiği anlamına gelir.\r\n### Filtre Modu\r\n- Hariç tut: İstenmeyen öğeleri kaldırın.\r\n- Dahil et: İstenen öğeleri dahil edin.\r\n### İstatistik Mantığı\r\n- VE mantığı: Aynı moddaki tüm öğelerin kesişimini alın.\r\n- VEYA mantığı: Aynı moddaki tüm öğelerin birleşimini alın.\r\n\r\nAyrıca entegrasyon öğesinin [Yapılandırma > Cihaz Listesini Güncelle] sayfasına gidip, yeniden filtrelemek için [Cihazları Filtrele]'yi işaretleyebilirsiniz.",
"data": {
"room_filter_mode": "Ev Odalarını Filtrele",
"room_list": "Ev Odaları",
"type_filter_mode": "Cihaz Bağlantı Türünü Filtrele",
"type_list": "Cihaz Bağlantı Türü",
"model_filter_mode": "Cihaz Modelini Filtrele",
"model_list": "Cihaz Modeli",
"devices_filter_mode": "Cihazları Filtrele",
"device_list": "Cihaz Listesi",
"statistics_logic": "İstatistik Mantığı"
}
}
},
"progress": {
"oauth": "### {link_left}Giriş yapmak için buraya tıklayın{link_right}\r\n(Başarılı girişten sonra otomatik olarak bir sonraki sayfaya yönlendirileceksiniz)"
},
"error": {
"eula_not_agree": "Lütfen risk bildirimini okuyun.",
"get_token_error": "Giriş yetkilendirme bilgileri (OAuth token) alınamadı.",
"get_homeinfo_error": "Ev bilgileri alınamadı.",
"mdns_discovery_error": "Yerel cihaz keşif hizmeti istisnası.",
"get_cert_error": "Merkezi hub ağ geçidi sertifikası alınamadı.",
"no_family_selected": "Ev seçilmedi.",
"no_devices": "Seçilen evde cihaz yok. Lütfen cihazı olan bir ev seçin ve devam edin.",
"no_filter_devices": "Filtrelenmiş cihazlar boş. Lütfen geçerli filtre kriterleri seçin ve devam edin.",
"no_central_device": "[Merkezi Hub Ağ Geçidi Modu], Home Assistant'ın bulunduğu yerel ağda kullanılabilir bir Xiaomi merkezi hub ağ geçidi gerektirir. Lütfen seçilen evin gereksinimi karşılayıp karşılamadığını kontrol edin.",
"invalid_network_addr": "Geçersiz IP adresi veya HTTP adresi algılandı, lütfen geçerli bir adres girin.",
"invalid_ip_addr": "Ulaşılamayan IP adresi algılandı, lütfen geçerli bir IP adresi girin.",
"invalid_http_addr": "Ulaşılamayan HTTP adresi algılandı, lütfen geçerli bir HTTP adresi girin.",
"invalid_default_addr": "Varsayılan ağ algılama adresi ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin veya özel bir ağ algılama adresi kullanın.",
"unreachable_oauth2_host": "OAuth2 kimlik doğrulama adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin.",
"unreachable_http_host": "Xiaomi HTTP API adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin.",
"unreachable_spec_host": "Xiaomi SPEC API adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin.",
"unreachable_mqtt_broker": "Xiaomi MQTT Broker adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin."
},
"abort": {
"ha_uuid_get_failed": "Home Assistant UUID alınamadı.",
"network_connect_error": "Yapılandırma başarısız oldu. Ağ bağlantısı anormal. Lütfen ekipman ağ yapılandırmasını kontrol edin.",
"already_configured": "Bu kullanıcı için yapılandırma zaten tamamlandı. Lütfen entegrasyon sayfasına gidin ve değişiklikler için YAPILANDIRMA düğmesine tıklayın.",
"invalid_auth_info": "Kimlik doğrulama bilgileri süresi doldu. Lütfen entegrasyon sayfasına gidin ve yeniden kimlik doğrulaması yapmak için YAPILANDIRMA düğmesine tıklayın.",
"config_flow_error": "Entegrasyon yapılandırma hatası: {error}."
}
},
"options": {
"step": {
"auth_config": {
"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 **[{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": {
"oauth_redirect_url": "OAuth2 Yönlendirme URL'si"
}
},
"oauth_error": {
"title": "Giriş sırasında bir hata oluştu.",
"description": "Tekrar denemek için İLERİ'ye tıklayın."
},
"config_options": {
"title": "Yapılandırma Seçenekleri",
"description": "### Merhaba, {nick_name}\r\n\r\nXiaomi ID: {uid}\r\nGeçerli Giriş Bölgesi: {cloud_server}\r\nEntegrasyon Örnek Kimliği: {instance_id}\r\n\r\nLütfen yapılandırmak istediğiniz seçenekleri seçin, ardından İLERİ'ye tıklayın.",
"data": {
"integration_language": "Entegrasyon Dili",
"update_user_info": "Kullanıcı bilgilerini güncelle",
"update_devices": "Cihaz listesini güncelle",
"action_debug": "Eylem için hata ayıklama modu",
"hide_non_standard_entities": "Standart olmayan oluşturulan varlıkları gizle",
"display_binary_mode": "İkili Sensör Görüntüleme Modu",
"display_devices_changed_notify": "Cihaz durum değişikliği bildirimlerini göster",
"update_trans_rules": "Varlık dönüştürme kurallarını güncelle",
"update_lan_ctrl_config": "LAN kontrol yapılandırmasını güncelle",
"network_detect_config": "Entegre ağ yapılandırması",
"cover_dead_zone_width": "Perde ölü bölge genişliği"
}
},
"update_user_info": {
"title": "Kullanıcı Takma Adını Güncelle",
"description": "Merhaba {nick_name}, aşağıda özel takma adınızı değiştirebilirsiniz.",
"data": {
"nick_name": "Takma Ad"
}
},
"homes_select": {
"title": "Evi ve Cihazları Yeniden Seç",
"description": "## Kullanım Talimatları\r\n### Evden cihazları içe aktar\r\nEntegrasyon, seçilen evlerden cihazları ekleyecektir.\r\n### Cihazları Filtrele\r\nCihazları ev oda adı, cihaz erişim türü ve cihaz modeline göre filtrelemeyi destekler, ayrıca cihaz boyutu filtrelemesini de destekler. **{local_count}** cihaz filtrelendi.\r\n### Kontrol modu\r\n- Otomatik: Yerel ağda kullanılabilir bir Xiaomi merkezi hub ağ geçidi olduğunda, Home Assistant cihaz kontrol komutlarını öncelikle merkezi hub ağ geçidi üzerinden göndererek yerel kontrolü sağlar. Yerel ağda merkezi hub ağ geçidi yoksa, Xiaomi LAN kontrol işlevi aracılığıyla kontrol komutları göndermeye çalışır. Yalnızca yukarıdaki yerel kontrol koşulları karşılanmadığında, cihaz kontrol komutları bulut üzerinden gönderilir.\r\n- Bulut: Tüm kontrol komutları bulut üzerinden gönderilir.",
"data": {
"home_infos": "Evden cihazları içe aktar",
"devices_filter": "Cihazları filtrele",
"ctrl_mode": "Kontrol modu"
}
},
"devices_filter": {
"title": "Cihazları Filtrele",
"description": "## Kullanım Talimatları\r\nCihazları ev oda adı, cihaz erişim türü ve cihaz modeline göre filtrelemeyi destekler, ayrıca cihaz boyutu filtrelemesini de destekler. Filtreleme mantığı aşağıdaki gibidir:\r\n- İlk olarak, istatistik mantığına göre, dahil edilen tüm öğelerin birleşimini veya kesişimini alın, ardından hariç tutulan öğelerin kesişimini veya birleşimini alın ve son olarak [hariç tutulan özet sonucu]ndan [dahil edilen özet sonucu]nu çıkararak [filtre sonucu]nu elde edin.\r\n- Dahil edilen öğe seçilmemişse, tümünün dahil edildiği anlamına gelir.\r\n### Filtre Modu\r\n- Hariç tut: İstenmeyen öğeleri kaldırın.\r\n- Dahil et: İstenen öğeleri dahil edin.\r\n### İstatistik Mantığı\r\n- VE mantığı: Aynı moddaki tüm öğelerin kesişimini alın.\r\n- VEYA mantığı: Aynı moddaki tüm öğelerin birleşimini alın.\r\n\r\nAyrıca entegrasyon öğesinin [Yapılandırma > Cihaz Listesini Güncelle] sayfasına gidip, yeniden filtrelemek için [Cihazları Filtrele]'yi işaretleyebilirsiniz.",
"data": {
"room_filter_mode": "Ev Odalarını Filtrele",
"room_list": "Ev Odaları",
"type_filter_mode": "Cihaz Bağlantı Türünü Filtrele",
"type_list": "Cihaz Bağlantı Türü",
"model_filter_mode": "Cihaz Modelini Filtrele",
"model_list": "Cihaz Modeli",
"devices_filter_mode": "Cihazları Filtrele",
"device_list": "Cihaz Listesi",
"statistics_logic": "İstatistik Mantığı"
}
},
"update_trans_rules": {
"title": "Varlık Dönüştürme Kurallarını Güncelle",
"description": "## Kullanım Talimatları\r\n- Mevcut entegrasyon örneğindeki cihazların varlık bilgilerini güncelleyin, MIoT-Spec-V2 çok dilli yapılandırma, boolean çeviri ve model filtreleme dahil.\r\n- **Uyarı**: Bu genel bir yapılandırmadır ve yerel önbelleği güncelleyecektir. Tüm entegrasyon örneklerini etkileyecektir.\r\n- Bu işlem biraz zaman alacaktır, lütfen sabırlı olun. \"Güncellemeyi Onayla\"yı işaretleyin ve **{urn_count}** kuralı güncellemeye başlamak için \"İleri\"ye tıklayın, aksi takdirde güncellemeyi atlayın.",
"data": {
"confirm": "Güncellemeyi onayla"
}
},
"update_lan_ctrl_config": {
"title": "LAN kontrol yapılandırmasını güncelle",
"description": "## Kullanım Talimatları\r\nXiaomi LAN kontrol işlevi için yapılandırmaları güncelleyin. Bulut ve merkezi hub ağ geçidi cihazları kontrol edemediğinde, entegrasyon LAN üzerinden cihazları kontrol etmeye çalışacaktır. Hiçbir ağ kartı seçilmezse, LAN kontrol işlevi etkin olmayacaktır.\r\n- Yalnızca LAN'daki MIoT-Spec-V2 uyumlu IP cihazları desteklenir. 2020'den önce üretilen bazı cihazlar LAN kontrolünü veya LAN aboneliğini desteklemeyebilir.\r\n- Lütfen kontrol edilecek cihazlarla aynı ağdaki ağ kartlarını seçin. Birden fazla ağ kartı seçilebilir. Home Assistant'ın birden fazla ağ kartı seçimi nedeniyle yerel ağa iki veya daha fazla bağlantısı varsa, en iyi ağ bağlantısına sahip olanı seçmeniz önerilir, aksi takdirde cihazlar üzerinde kötü etkisi olabilir.\r\n- LAN'da yerel kontrolü destekleyen terminal cihazlar (ekranlı Xiaomi hoparlör, cep telefonu, vb.) varsa, LAN aboneliğini etkinleştirmek yerel otomasyon ve cihaz anormalliklerine neden olabilir.\r\n- **Uyarı**: Bu genel bir yapılandırmadır. Tüm entegrasyon örneklerini etkileyecektir. Lütfen dikkatli kullanın.\r\n{notice_net_dup}",
"data": {
"net_interfaces": "Lütfen kullanılacak ağ kartını seçin",
"enable_subscribe": "LAN aboneliğini etkinleştir"
}
},
"network_detect_config": {
"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,{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": {
"network_detect_addr": "Ağ Algılama Adresi",
"check_network_deps": "Ağ Bağımlılıklarını Kontrol Et"
}
},
"config_confirm": {
"title": "Yapılandırmayı Onayla",
"description": "Merhaba **{nick_name}**, lütfen en son yapılandırma bilgilerini onaylayın ve ardından GÖNDER'e tıklayın.\r\nEntegrasyon güncellenmiş yapılandırmayla yeniden yüklenecektir.\r\n\r\nEntegrasyon Dili:\t{lang_new}\r\nTakma Ad:\t{nick_name_new}\r\nEylem için hata ayıklama modu:\t{action_debug}\r\nStandart olmayan oluşturulan varlıkları gizle:\t{hide_non_standard_entities}\r\nPerde ölü bölge genişliği:\t{cover_width_new}\r\nCihaz durum değişikliği bildirimlerini göster:\t{display_devices_changed_notify}\r\nCihaz Değişiklikleri:\t**{devices_add}** cihaz ekle, **{devices_remove}** cihaz kaldır\r\nDönüştürme kuralları değişikliği:\tToplam **{trans_rules_count}** kural var ve **{trans_rules_count_success}** kural güncellendi",
"data": {
"confirm": "Değişikliği onayla"
}
}
},
"progress": {
"oauth": "### {link_left}Yeniden giriş yapmak için lütfen buraya tıklayın{link_right}"
},
"error": {
"not_auth": "Kimlik doğrulanmadı. Lütfen kullanıcı kimliğini doğrulamak için kimlik doğrulama bağlantısına tıklayın.",
"get_token_error": "Giriş yetkilendirme bilgileri (OAuth token) alınamadı.",
"get_homeinfo_error": "Ev bilgileri alınamadı.",
"get_cert_error": "Merkezi hub ağ geçidi sertifikası alınamadı.",
"no_devices": "Seçilen evde cihaz yok. Lütfen cihazı olan bir ev seçin ve devam edin.",
"no_filter_devices": "Filtrelenmiş cihazlar boş. Lütfen geçerli filtre kriterleri seçin ve devam edin.",
"no_family_selected": "Ev seçilmedi.",
"no_central_device": "[Merkezi Hub Ağ Geçidi Modu], Home Assistant'ın bulunduğu yerel ağda kullanılabilir bir Xiaomi merkezi hub ağ geçidi gerektirir. Lütfen seçilen evin gereksinimi karşılayıp karşılamadığını kontrol edin.",
"mdns_discovery_error": "Yerel cihaz keşif hizmeti istisnası.",
"update_config_error": "Yapılandırma bilgileri güncellenemedi.",
"not_confirm": "Değişiklikler onaylanmadı. Lütfen göndermeden önce değişikliği onaylayın.",
"invalid_network_addr": "Geçersiz IP adresi veya HTTP adresi algılandı, lütfen geçerli bir adres girin.",
"invalid_ip_addr": "Ulaşılamayan IP adresi algılandı, lütfen geçerli bir IP adresi girin.",
"invalid_http_addr": "Ulaşılamayan HTTP adresi algılandı, lütfen geçerli bir HTTP adresi girin.",
"invalid_default_addr": "Varsayılan ağ algılama adresi ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin veya özel bir ağ algılama adresi kullanın.",
"unreachable_oauth2_host": "OAuth2 kimlik doğrulama adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin.",
"unreachable_http_host": "Xiaomi HTTP API adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin.",
"unreachable_spec_host": "Xiaomi SPEC API adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin.",
"unreachable_mqtt_broker": "Xiaomi MQTT Broker adresine ulaşılamıyor, lütfen ağ yapılandırmasını kontrol edin."
},
"abort": {
"network_connect_error": "Yapılandırma başarısız oldu. Ağ bağlantısı anormal. Lütfen ekipman ağ yapılandırmasını kontrol edin.",
"options_flow_error": "Entegrasyon yeniden yapılandırma hatası: {error}",
"re_add": "Lütfen entegrasyonu yeniden ekleyin. Hata mesajı: {error}",
"storage_error": "Entegrasyon depolama modülü istisnası. Lütfen tekrar deneyin veya entegrasyonu yeniden ekleyin: {error}",
"inconsistent_account": "Hesap bilgileri tutarsız. Lütfen doğru hesapla giriş yapın."
}
}
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "基础配置",
"description": "### 登录地区\r\n选择小米账号所在的地区。您可以在 `米家APP > 我的(位于底部菜单) > 更多设置 > 关于米家` 中查看。\r\n### 语言\r\n选择设备及实体名称所用的语言。缺少翻译的部分语句将使用英文显示。\r\n### OAuth2 认证跳转地址\r\nOAuth2 认证跳转地址为 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**,Home Assistant 需要与当前操作终端(例如,个人电脑)在同一局域网内,且操作终端能通过该地址访问 Home Assistant 首页,否则登录认证可能会失败。\r\n### 集成网络配置\r\n检测本地网络是否正常,相关网络资源是否可访问。**首次添加时建议勾选。**\r\n### 注意事项\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": {
"cloud_server": "登录地区",
"integration_language": "语言",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"title": "网络检测配置",
"description": "## 使用介绍\r\n### 网络检测地址\r\n用于检测网络是否正常,未设置时将使用系统默认地址检测。如果默认地址检测异常时,可尝试输入可用的自定义地址检测。\r\n- 可输入多个检测地址,地址之间使用`,`号间隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果为IP地址,将采用ping方式检测,如果为http(s)地址,将采用 HTTP GET 访问该地址检测。\r\n- 如果想恢复系统默认检测地址,请输入`,`号,然后点击'下一步'。\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://{cloud_server}-ha.mqtt.io.mi.com:8883`。",
"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": {
"network_detect_addr": "网络检测地址",
"check_network_deps": "检测网络依赖项"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "认证跳转地址"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "更新实体转换规则",
"update_lan_ctrl_config": "更新局域网控制配置",
"network_detect_config": "集成网络配置",
"cover_closed_position": "窗帘关闭位置"
"cover_dead_zone_width": "窗帘盲区宽度"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"title": "网络检测配置",
"description": "## 使用介绍\r\n### 网络检测地址\r\n用于检测网络是否正常,未设置时将使用系统默认地址检测。如果默认地址检测异常时,可尝试输入可用的自定义地址检测。\r\n- 可输入多个检测地址,地址之间使用`,`号间隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果为IP地址,将采用ping方式检测,如果为http(s)地址,将采用 HTTP GET 访问该地址检测。\r\n- 如果想恢复系统默认检测地址,请输入`,`号,然后点击'下一步'。\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://{cloud_server}-ha.mqtt.io.mi.com:8883`。",
"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": {
"network_detect_addr": "网络检测地址",
"check_network_deps": "检测网络依赖项"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "确认配置",
"description": "**{nick_name}** 您好!请确认最新的配置信息,然后点击“提交”。\r\n集成将会使用更新后的配置重新载入。\r\n\r\n集成语言:\t{lang_new}\r\n用户昵称:\t{nick_name_new}\r\nAction 调试模式:\t{action_debug}\r\n隐藏非标准生成实体:\t{hide_non_standard_entities}\r\n窗帘关闭位置:\t{cover_pos_new}\r\n显示设备状态变化通知:\t{display_devices_changed_notify}\r\n设备变化:\t新增 **{devices_add}** 个设备,移除 **{devices_remove}** 个设备\r\n转换规则变化:\t共条 **{trans_rules_count}** 规则,更新 **{trans_rules_count_success}** 条规则",
"description": "**{nick_name}** 您好!请确认最新的配置信息,然后点击“提交”。\r\n集成将会使用更新后的配置重新载入。\r\n\r\n集成语言:\t{lang_new}\r\n用户昵称:\t{nick_name_new}\r\nAction 调试模式:\t{action_debug}\r\n隐藏非标准生成实体:\t{hide_non_standard_entities}\r\n窗帘盲区宽度:\t{cover_width_new}\r\n显示设备状态变化通知:\t{display_devices_changed_notify}\r\n设备变化:\t新增 **{devices_add}** 个设备,移除 **{devices_remove}** 个设备\r\n转换规则变化:\t共条 **{trans_rules_count}** 规则,更新 **{trans_rules_count_success}** 条规则",
"data": {
"confirm": "确认修改"
}

View File

@@ -11,7 +11,7 @@
},
"auth_config": {
"title": "基礎配置",
"description": "### 登錄地區\r\n選擇小米帳號所在的地區。您可以在 `米家APP > 我的(位於底部菜單) > 更多設置 > 關於米家` 中查看。\r\n### 語言\r\n選擇設備及實體名稱所用的語言。缺少翻譯的部分語句將使用英文顯示。\r\n### OAuth2 認證跳轉地址\r\nOAuth2 認證跳轉地址為 **[http://homeassistant.local:8123](http://homeassistant.local:8123)**,Home Assistant 需要與當前操作終端(例如,個人電腦)在同一局域網內,且操作終端能通過該地址訪問 Home Assistant 首頁,否則登錄認證可能會失敗。\r\n### 集成網絡配置\r\n檢測本地網絡是否正常,相關網絡資源是否可訪問。**首次添加時建議勾選。**\r\n### 注意事項\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": {
"cloud_server": "登錄地區",
"integration_language": "語言",
@@ -21,7 +21,7 @@
},
"network_detect_config": {
"title": "集成網絡配置",
"description": "## 使用介紹\r\n### 網絡檢測地址\r\n用於檢測網絡是否正常,未設置時將使用系統默認地址檢測。如果默認地址檢測異常時,可嘗試輸入可用的自定義地址檢測。\r\n- 可輸入多個檢測地址,地址之間使用`,`號間隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果為IP地址,將採用ping方式檢測,如果為http(s)地址,將採用 HTTP GET 訪問該地址檢測。\r\n- 如果想恢復系統默認檢測地址,請輸入`,`號,然後點擊'下一步'。\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://{cloud_server}-ha.mqtt.io.mi.com:8883`。",
"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": {
"network_detect_addr": "網絡檢測地址",
"check_network_deps": "檢測網絡依賴項"
@@ -102,7 +102,7 @@
"step": {
"auth_config": {
"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": {
"oauth_redirect_url": "認證跳轉地址"
}
@@ -125,7 +125,7 @@
"update_trans_rules": "更新實體轉換規則",
"update_lan_ctrl_config": "更新局域網控制配置",
"network_detect_config": "集成網絡配置",
"cover_closed_position": "窗簾關閉位置"
"cover_dead_zone_width": "窗簾盲區寬度"
}
},
"update_user_info": {
@@ -176,7 +176,7 @@
},
"network_detect_config": {
"title": "集成網絡配置",
"description": "## 使用介紹\r\n### 網絡檢測地址\r\n用於檢測網絡是否正常,未設置時將使用系統默認地址檢測。如果默認地址檢測異常時,可嘗試輸入可用的自定義地址檢測。\r\n- 可輸入多個檢測地址,地址之間使用`,`號間隔,如`8.8.8.8,https://www.bing.com`\r\n- 如果為IP地址,將採用ping方式檢測,如果為http(s)地址,將採用 HTTP GET 訪問該地址檢測。\r\n- 如果想恢復系統默認檢測地址,請輸入`,`號,然後點擊'下一步'。\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://{cloud_server}-ha.mqtt.io.mi.com:8883`。",
"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": {
"network_detect_addr": "網絡檢測地址",
"check_network_deps": "檢測網絡依賴項"
@@ -184,7 +184,7 @@
},
"config_confirm": {
"title": "確認配置",
"description": "**{nick_name}** 您好!請確認最新的配置信息,然後點擊“提交”。\r\n集成將會使用更新後的配置重新載入。\r\n\r\n集成語言:\t{lang_new}\r\n用戶暱稱:\t{nick_name_new}\r\nAction 調試模式:\t{action_debug}\r\n隱藏非標準生成實體:\t{hide_non_standard_entities}\r\n窗簾關閉位置:\t{cover_pos_new}\r\n顯示設備狀態變化通知:\t{display_devices_changed_notify}\r\n設備變化:\t新增 **{devices_add}** 個設備,移除 **{devices_remove}** 個設備\r\n轉換規則變化:\t共條 **{trans_rules_count}** 規則,更新 **{trans_rules_count_success}** 條規則",
"description": "**{nick_name}** 您好!請確認最新的配置信息,然後點擊“提交”。\r\n集成將會使用更新後的配置重新載入。\r\n\r\n集成語言:\t{lang_new}\r\n用戶暱稱:\t{nick_name_new}\r\nAction 調試模式:\t{action_debug}\r\n隱藏非標準生成實體:\t{hide_non_standard_entities}\r\n窗簾盲區寬度:\t{cover_width_new}\r\n顯示設備狀態變化通知:\t{display_devices_changed_notify}\r\n設備變化:\t新增 **{devices_add}** 個設備,移除 **{devices_remove}** 個設備\r\n轉換規則變化:\t共條 **{trans_rules_count}** 規則,更新 **{trans_rules_count_success}** 條規則",
"data": {
"confirm": "確認修改"
}

View File

@@ -60,6 +60,12 @@ from .miot.const import DOMAIN
from .miot.miot_device import MIoTDevice, MIoTServiceEntity, MIoTEntityData
from .miot.miot_spec import (MIoTSpecAction, MIoTSpecProperty)
try: # VacuumActivity is introduced in HA core 2025.1.0
from homeassistant.components.vacuum import VacuumActivity
HA_CORE_HAS_ACTIVITY = True
except ImportError:
HA_CORE_HAS_ACTIVITY = False
_LOGGER = logging.getLogger(__name__)
@@ -84,7 +90,11 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
# pylint: disable=unused-argument
_prop_status: Optional[MIoTSpecProperty]
_prop_fan_level: Optional[MIoTSpecProperty]
_prop_battery_level: Optional[MIoTSpecProperty]
_prop_status_cleaning: Optional[list[int]]
_prop_status_docked: Optional[list[int]]
_prop_status_paused: Optional[list[int]]
_prop_status_returning: Optional[list[int]]
_prop_status_error: Optional[list[int]]
_action_start_sweep: Optional[MIoTSpecAction]
_action_stop_sweeping: Optional[MIoTSpecAction]
@@ -106,7 +116,11 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
self._prop_status = None
self._prop_fan_level = None
self._prop_battery_level = None
self._prop_status_cleaning = []
self._prop_status_docked = []
self._prop_status_paused = []
self._prop_status_returning = []
self._prop_status_error = []
self._action_start_sweep = None
self._action_stop_sweeping = None
self._action_pause_sweeping = None
@@ -126,6 +140,35 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
self._status_map = prop.value_list.to_map()
self._attr_supported_features |= VacuumEntityFeature.STATE
self._prop_status = prop
for item in prop.value_list.items:
item_str: str = item.name
item_name: str = re.sub(r'[^a-z]', '', item_str)
if item_name in {
'charging', 'charged', 'chargingcompleted',
'fullcharge', 'fullpower', 'findchargerpause',
'drying', 'washing', 'wash', 'inthewash',
'inthedry', 'stationworking', 'dustcollecting',
'upgrade', 'upgrading', 'updating'
}:
self._prop_status_docked.append(item.value)
elif item_name in {'paused', 'pause'}:
self._prop_status_paused.append(item.value)
elif item_name in {
'gocharging', 'cleancompletegocharging',
'findchargewash', 'backtowashmop', 'gowash',
'gowashing', 'summon'
}:
self._prop_status_returning.append(item.value)
elif item_name in {
'error', 'breakcharging', 'gochargebreak'
}:
self._prop_status_error.append(item.value)
elif (item_name.find('sweeping') != -1) or (
item_name.find('mopping') != -1) or (item_name in {
'cleaning', 'remoteclean', 'continuesweep',
'busy', 'building', 'buildingmap', 'mapping'
}):
self._prop_status_cleaning.append(item.value)
elif prop.name == 'fan-level':
if not prop.value_list:
_LOGGER.error('invalid fan-level value_list, %s',
@@ -135,9 +178,6 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
self._attr_fan_speed_list = list(self._fan_level_map.values())
self._attr_supported_features |= VacuumEntityFeature.FAN_SPEED
self._prop_fan_level = prop
elif prop.name == 'battery-level':
self._attr_supported_features |= VacuumEntityFeature.BATTERY
self._prop_battery_level = prop
# action
for action in entity_data.actions:
if action.name == 'start-sweep':
@@ -158,18 +198,22 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
self._attr_supported_features |= VacuumEntityFeature.LOCATE
self._action_identify = action
# Use start-charge from battery service as fallback
# if stop-and-gocharge is not available
if self._action_stop_and_gocharge is None:
for action in entity_data.actions:
if action.name == 'start-charge':
self._attr_supported_features |= (
VacuumEntityFeature.RETURN_HOME)
self._action_stop_and_gocharge = action
break
async def async_start(self) -> None:
"""Start or resume the cleaning task."""
try: # VacuumActivity is introduced in HA core 2025.1.0
# pylint: disable=import-outside-toplevel
from homeassistant.components.vacuum import VacuumActivity
if (self.activity
== VacuumActivity.PAUSED) and self._action_continue_sweep:
await self.action_async(action=self._action_continue_sweep)
return
except ImportError:
if self.state and (self.state in {'paused', 'pause'
}) and self._action_continue_sweep:
if self._prop_status is not None:
status = self.get_prop_value(prop=self._prop_status)
if (status in self._prop_status_paused
) and self._action_continue_sweep:
await self.action_async(action=self._action_continue_sweep)
return
await self.action_async(action=self._action_start_sweep)
@@ -203,9 +247,17 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
return self._device_name
@property
def state(self) -> Optional[str]:
"""Return the current state of the vacuum cleaner.
def fan_speed(self) -> Optional[str]:
"""The current fan speed of the vacuum cleaner."""
return self.get_map_value(
map_=self._fan_level_map,
key=self.get_prop_value(prop=self._prop_fan_level))
if HA_CORE_HAS_ACTIVITY:
@property
def activity(self) -> Optional[str]:
"""The current vacuum activity.
To fix the HA warning below:
Detected that custom integration 'xiaomi_home' is setting state
directly.Entity XXX(<class 'custom_components.xiaomi_home.vacuum
@@ -220,58 +272,27 @@ class Vacuum(MIoTServiceEntity, StateVacuumEntity):
more constants, try get matching VacuumActivity enum first, return state
string as before if there is no match. In Home Assistant 2026.1, every
state should map to a VacuumActivity enum.
"""
return self.activity
@property
def activity(self) -> Optional[str]:
"""The current vacuum activity."""
status = self.get_prop_value(prop=self._prop_status)
if status is None:
return None
status_value = self.get_map_value(map_=self._status_map, key=status)
if status_value is None:
return None
try:
# pylint: disable=import-outside-toplevel
from homeassistant.components.vacuum import VacuumActivity
status_value = status_value.lower()
status_str = re.sub(r'[^a-z]', '', status_value)
if status_str in {
'charging', 'charged', 'chargingcompleted', 'fullcharge',
'fullpower', 'findchargerpause', 'drying', 'washing',
'wash', 'inthewash', 'inthedry', 'stationworking',
'dustcollecting', 'upgrade', 'upgrading', 'updating'
}:
return VacuumActivity.DOCKED
if status_str in {'paused', 'pause'}:
return VacuumActivity.PAUSED
if status_str in {
'gocharging', 'cleancompletegocharging', 'findchargewash',
'backtowashmop', 'gowash', 'gowashing', 'summon'
}:
return VacuumActivity.RETURNING
if (status_str.find('sweeping')
!= -1) or (status_str.find('mopping')
!= -1) or (status_str in {
'cleaning', 'remoteclean', 'continuesweep',
'busy', 'building', 'buildingmap', 'mapping'
}):
"""
status = self.get_prop_value(prop=self._prop_status)
if status is None:
return None
if status in self._prop_status_cleaning:
return VacuumActivity.CLEANING
if status_str in {'error', 'breakcharging', 'gochargebreak'}:
if status in self._prop_status_docked:
return VacuumActivity.DOCKED
if status in self._prop_status_paused:
return VacuumActivity.PAUSED
if status in self._prop_status_returning:
return VacuumActivity.RETURNING
if status in self._prop_status_error:
return VacuumActivity.ERROR
return VacuumActivity.IDLE
except ImportError:
return status_value
@property
def battery_level(self) -> Optional[int]:
"""The current battery level of the vacuum cleaner."""
return self.get_prop_value(prop=self._prop_battery_level)
else:
@property
def fan_speed(self) -> Optional[str]:
"""The current fan speed of the vacuum cleaner."""
return self.get_map_value(
map_=self._fan_level_map,
key=self.get_prop_value(prop=self._prop_fan_level))
@property
def state(self) -> Optional[str]:
"""The current state of the vacuum."""
status = self.get_prop_value(prop=self._prop_status)
return None if (status is None) else self.get_map_value(
map_=self._status_map, key=status)

View File

@@ -168,7 +168,7 @@ class WaterHeater(MIoTServiceEntity, WaterHeaterEntity):
if operation_mode == STATE_ON:
await self.set_property_async(prop=self._prop_on, value=True)
return
if self.get_prop_value(prop=self._prop_on) is False:
if self.get_prop_value(prop=self._prop_on) is not True:
await self.set_property_async(prop=self._prop_on,
value=True,
write_ha_state=False)

View File

@@ -93,11 +93,11 @@ git checkout v1.0.0
- 米家集成是否支持本地化控制?
米家集成支持通过[小米中枢网关](https://www.mi.com/shop/buy/detail?product_id=15755&cfrom=search)(固件版本 3.4.0_000 以上)或内置中枢网关(软件版本 0.8.0 以上)的米家设备实现本地化控制。如果没有小米中枢网关或其他带中枢网关功能的设备,那么所有控制指令都会通过小米云发送。支持 Home Assistant 本地化控制的小米中枢网关(含内置中枢网关)的固件尚未发布,固件升级计划请参阅 MIoT 团队的通知。
米家集成支持通过[小米中枢网关](https://www.mi.com/shop/buy/detail?product_id=15755&cfrom=search)(固件版本 3.3.0_0023 及以上)或[内置中枢网关](https://github.com/XiaoMi/ha_xiaomi_home/wiki/Central-hub-gateway-device-models)(软件版本 0.8.9 及以上)的米家设备实现本地化控制。如果没有小米中枢网关或其他带中枢网关功能的设备,那么所有控制指令都会通过小米云发送。支持 Home Assistant 本地化控制的小米中枢网关(含内置中枢网关)的固件已发布。
小米中枢网关仅在中国大陆可用,在其他地区不可用。
米家集成也能通过开启小米局域网控制功能实现部分本地化控制效果。小米局域网控制功能只能控制与 Home Assistant 处于同一局域网内的 IP 设备(使用 WiFi、网线连接路由器的设备),无法控制蓝牙 Mesh、ZigBee 等协议接入的设备。该功能可能会引起一些异常,我们建议不要使用该功能。小米局域网控制功能开启方法:[设置 > 设备与服务 > 已配置 > Xiaomi Home](https://my.home-assistant.io/redirect/integration/?domain=xiaomi_home) > 配置 > 更新局域网控制配置
米家集成也能通过开启小米局域网控制功能实现部分本地化控制效果。小米局域网控制功能只能控制与 Home Assistant 处于同一局域网内的 IP 设备(使用 WiFi、网线连接路由器的设备),无法控制蓝牙 Mesh、ZigBee 等协议接入的设备。该功能可能会引起一些异常,我们建议不要使用该功能。小米局域网控制功能开启方法:[设置 > 设备与服务 > 已配置 > Xiaomi Home](https://my.home-assistant.io/redirect/integration/?domain=xiaomi_home) > 配置 > 更新局域网控制配置。
小米局域网控制功能不受地区限制,在全球范围内均可用。如果 Home Assistant 所在的局域网内存在中枢网关,那么即便米家集成开启了小米局域网控制功能,该功能也不会生效。
@@ -330,7 +330,7 @@ urn:miot-spec-v2:device:gateway:0000A019:xiaomi-hub1:
## 多语言支持
米家集成配置选项中可选择的集成使用的语言有简体中文、繁体中文、英文、西班牙语、俄语、法语、德语、日语这八种语言。目前,米家集成配置页面的简体中文和英文已经过人工校审,其他语言由机器翻译。如果您希望修改配置页面的词句,则需要修改 `custom_components/xiaomi_home/translations/` 以及 `custom_components/xiaomi_home/miot/i18n/` 目录下相应语言的 json 文件。
米家集成配置选项中可选择的集成使用的语言有简体中文、繁体中文、英文、西班牙语、俄语、法语、德语、日语、意大利语、荷兰语、葡萄牙语、巴西葡萄牙语、土耳其语这十三种语言。目前,米家集成配置页面的简体中文和英文已经过人工校审,其他语言由机器翻译或社区贡献。如果您希望修改配置页面的词句,则需要修改 `custom_components/xiaomi_home/translations/` 以及 `custom_components/xiaomi_home/miot/i18n/` 目录下相应语言的 json 文件。
在显示 Home Assistant 实体名称时,米家集成会从小米云下载设备厂商为设备配置的多语言文件,该文件包含设备 MIoT-Spec-V2 实例的多语言翻译。 `multi_lang.json` 是本地维护的多语言配置字典,其优先级高于从云端获取的多语言文件,可用于补充或修改设备的多语言翻译。
@@ -348,7 +348,7 @@ urn:miot-spec-v2:device:gateway:0000A019:xiaomi-hub1:
`multi_lang.json` 的键值为 MIoT-Spec-V2 设备实例的 urn (不含版本号“version”字段)。
language code 为语言代码,取值为 zh-Hans、zh-Hant、en、es、ru、fr、de、ja (对应上述米家集成可选的八种语言)。
language code 为语言代码,取值为 zh-Hans、zh-Hant、en、es、ru、fr、de、ja、it、nl、pt、pt-BR、tr(对应上述米家集成可选的十三种语言)。
instance code 为 MIoT-Spec-V2 实例代码,格式如下:
@@ -386,6 +386,7 @@ siid、piid、eiid、aiid、value 均为十进制三位整数。
- 贡献指南: [English](../CONTRIBUTING.md) | [简体中文](./CONTRIBUTING_zh.md)
- [更新日志](../CHANGELOG.md)
- 开发文档: https://developers.home-assistant.io/docs/creating_component_index
- [常见问题](https://github.com/XiaoMi/ha_xiaomi_home/wiki)
## 目录结构

View File

@@ -4,7 +4,7 @@ import logging
import random
import shutil
import pytest
from os import path, makedirs
from os import path, makedirs, remove
from uuid import uuid4
TEST_ROOT_PATH: str = path.dirname(path.abspath(__file__))
@@ -57,6 +57,12 @@ def load_py_file():
file_name),
path.join(TEST_FILES_PATH, file_name))
_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
shutil.copytree(
src=path.join(
@@ -89,6 +95,11 @@ def load_py_file():
shutil.rmtree(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):
shutil.rmtree(TEST_CACHE_PATH)
print('removed test cache, ', TEST_CACHE_PATH)