Skip to content

Commit

Permalink
feat: support devices filter & devices changed notify (#332)
Browse files Browse the repository at this point in the history
* feat: add devices filter page

* doc: update translations and i18n

* fix: cancel miot http timer

* feat: improve devices filter

* doc: update translations/de

* fix: i18n type error

* feat: config flow support device filter

* fix: fix mdns type error

* fix: fix miot client i18n logic

* feat: add connect type

* doc: update translations and i18n

* feat: update auth info save logic

* feat: improve config flow devices filter

* fix: fix some type error

* doc: update translations for option flow

* fix: fix option flow type error

* feat: support option flow devices filter

* doc: update option flow tranlations

* feat: update webhook handle func to private

* feat: update config flow translations

* doc: update tranlations text

* feat: custom display device changed notify

* feat: device changed notify logical refinement

* doc: update translations content
  • Loading branch information
topsworld authored Dec 24, 2024
1 parent 78461cb commit 29b7489
Show file tree
Hide file tree
Showing 27 changed files with 1,739 additions and 392 deletions.
875 changes: 644 additions & 231 deletions custom_components/xiaomi_home/config_flow.py

Large diffs are not rendered by default.

43 changes: 42 additions & 1 deletion custom_components/xiaomi_home/miot/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,48 @@
"config": {
"other": {
"devices": "Geräte",
"found_central_gateway": ", lokales zentrales Gateway gefunden"
"found_central_gateway": ", lokales zentrales Gateway gefunden",
"without_room": "Kein Raum zugewiesen",
"no_display": "nicht anzeigen"
},
"control_mode": {
"auto": "automatisch",
"cloud": "Cloud"
},
"statistics_logic": {
"or": "ODER-Logik",
"and": "UND-Logik"
},
"filter_mode": {
"exclude": "ausschließen",
"include": "einschließen"
},
"connect_type": {
"0": "WiFi",
"1": "yunyi-Gerät",
"2": "Cloud-Gerät",
"3": "ZigBee",
"4": "webSocket",
"5": "virtuelles Gerät",
"6": "BLE",
"7": "lokaler AP",
"8": "WiFi+BLE",
"9": "andere",
"10": "Funktions-Plug-in",
"11": "Zellnetz",
"12": "Kabel",
"13": "NB-IoT",
"14": "Drittanbieter-Cloud-Zugriff",
"15": "Infrarot-Fernbedienungsgerät",
"16": "BLE-Mesh",
"17": "virtuelle Gerätegruppe",
"18": "Gateway-Untergerät",
"19": "Sicherheitsstufe Gateway-Untergerät",
"22": "PLC",
"23": "nur Kabel",
"24": "Matter",
"25": "WiFi+Zellnetz"
},
"room_name_rule": {
"none": "nicht synchronisieren",
"home_room": "Hausname und Raumname (Xiaomi Home Schlafzimmer)",
Expand All @@ -18,6 +54,11 @@
"enable": "aktivieren",
"disable": "deaktivieren"
},
"device_state": {
"add": "hinzufügen",
"del": "nicht verfügbar",
"offline": "offline"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[Hinweis]** Es wurden mehrere Netzwerkkarten erkannt, die möglicherweise mit demselben Netzwerk verbunden sind. Bitte achten Sie auf die Auswahl.",
"net_unavailable": "Schnittstelle nicht verfügbar"
Expand Down
43 changes: 42 additions & 1 deletion custom_components/xiaomi_home/miot/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,48 @@
"config": {
"other": {
"devices": "Devices",
"found_central_gateway": ", Found Local Central Hub Gateway"
"found_central_gateway": ", Found Local Central Hub Gateway",
"without_room": "No room assigned",
"no_display": "Do not display"
},
"control_mode": {
"auto": "Auto",
"cloud": "Cloud"
},
"statistics_logic": {
"or": "OR logic",
"and": "AND logic"
},
"filter_mode": {
"exclude": "Exclude",
"include": "Include"
},
"connect_type": {
"0": "WiFi",
"1": "yunyi device",
"2": "Cloud device",
"3": "ZigBee",
"4": "webSocket",
"5": "Virtual device",
"6": "BLE",
"7": "Local AP",
"8": "WiFi+BLE",
"9": "Other",
"10": "Function plug-in",
"11": "Cellular network",
"12": "Cable",
"13": "NB-IoT",
"14": "Third-party cloud access",
"15": "Infrared remote control device",
"16": "BLE-Mesh",
"17": "Virtual device group",
"18": "Gateway sub-device",
"19": "Security level gateway sub-device",
"22": "PLC",
"23": "Cable only",
"24": "Matter",
"25": "WiFi+Cellular network"
},
"room_name_rule": {
"none": "Do not synchronize",
"home_room": "Home Name and Room Name (Xiaomi Home Bedroom)",
Expand All @@ -18,6 +54,11 @@
"enable": "Enable",
"disable": "Disable"
},
"device_state": {
"add": "Add",
"del": "Unavailable",
"offline": "Offline"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[Notice]** Multiple network cards detected that may be connected to the same network. Please pay attention to the selection.",
"net_unavailable": "Interface unavailable"
Expand Down
43 changes: 42 additions & 1 deletion custom_components/xiaomi_home/miot/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,48 @@
"config": {
"other": {
"devices": "dispositivos",
"found_central_gateway": ", se encontró la puerta de enlace central local"
"found_central_gateway": ", se encontró la puerta de enlace central local",
"without_room": "Sin habitación asignada",
"no_display": "no mostrar"
},
"control_mode": {
"auto": "automático",
"cloud": "nube"
},
"statistics_logic": {
"or": "lógica OR",
"and": "lógica AND"
},
"filter_mode": {
"exclude": "excluir",
"include": "incluir"
},
"connect_type": {
"0": "WiFi",
"1": "dispositivo yunyi",
"2": "dispositivo de nube",
"3": "ZigBee",
"4": "webSocket",
"5": "dispositivo virtual",
"6": "BLE",
"7": "AP local",
"8": "WiFi+BLE",
"9": "otro",
"10": "complemento de función",
"11": "red celular",
"12": "cable",
"13": "NB-IoT",
"14": "acceso a la nube de terceros",
"15": "dispositivo de control remoto infrarrojo",
"16": "BLE-Mesh",
"17": "grupo de dispositivos virtuales",
"18": "subdispositivo de puerta de enlace",
"19": "subdispositivo de puerta de enlace de nivel de seguridad",
"22": "PLC",
"23": "solo cable",
"24": "Matter",
"25": "WiFi+red celular"
},
"room_name_rule": {
"none": "no sincronizar",
"home_room": "nombre de la casa y nombre de la habitación (Xiaomi Home Dormitorio)",
Expand All @@ -18,6 +54,11 @@
"enable": "habilitar",
"disable": "deshabilitar"
},
"device_state": {
"add": "agregar",
"del": "no disponible",
"offline": "fuera de línea"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[Aviso]** Se detectaron varias tarjetas de red que pueden estar conectadas a la misma red. Por favor, preste atención a la selección.",
"net_unavailable": "Interfaz no disponible"
Expand Down
43 changes: 42 additions & 1 deletion custom_components/xiaomi_home/miot/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,48 @@
"config": {
"other": {
"devices": "appareils",
"found_central_gateway": ", passerelle centrale locale trouvée"
"found_central_gateway": ", passerelle centrale locale trouvée",
"without_room": "Aucune pièce attribuée",
"no_display": "ne pas afficher"
},
"control_mode": {
"auto": "automatique",
"cloud": "cloud"
},
"statistics_logic": {
"or": "ou logique",
"and": "et logique"
},
"filter_mode": {
"exclude": "exclure",
"include": "inclure"
},
"connect_type": {
"0": "WiFi",
"1": "appareil yunyi",
"2": "appareil cloud",
"3": "ZigBee",
"4": "webSocket",
"5": "appareil virtuel",
"6": "BLE",
"7": "AP local",
"8": "WiFi+BLE",
"9": "autre",
"10": "plug-in de fonction",
"11": "réseau cellulaire",
"12": "câble",
"13": "NB-IoT",
"14": "accès cloud tiers",
"15": "appareil de télécommande infrarouge",
"16": "BLE-Mesh",
"17": "groupe d'appareils virtuels",
"18": "sous-appareil de passerelle",
"19": "niveau de sécurité sous-appareil de passerelle",
"22": "PLC",
"23": "câble uniquement",
"24": "Matter",
"25": "WiFi+réseau cellulaire"
},
"room_name_rule": {
"none": "ne pas synchroniser",
"home_room": "nom de la maison et nom de la pièce (Xiaomi Home Chambre)",
Expand All @@ -18,6 +54,11 @@
"enable": "activer",
"disable": "désactiver"
},
"device_state": {
"add": "Ajouter",
"del": "Supprimer",
"offline": "hors ligne"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[Remarque]** Plusieurs cartes réseau détectées qui peuvent être connectées au même réseau. Veuillez faire attention à la sélection.",
"net_unavailable": "Interface non disponible"
Expand Down
43 changes: 42 additions & 1 deletion custom_components/xiaomi_home/miot/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,48 @@
"config": {
"other": {
"devices": "デバイス",
"found_central_gateway": "、ローカル中央ゲートウェイが見つかりました"
"found_central_gateway": "、ローカル中央ゲートウェイが見つかりました",
"without_room": "部屋が割り当てられていません",
"no_display": "表示しない"
},
"control_mode": {
"auto": "自動",
"cloud": "クラウド"
},
"statistics_logic": {
"or": "ORロジック",
"and": "ANDロジック"
},
"filter_mode": {
"exclude": "除外",
"include": "含む"
},
"connect_type": {
"0": "WiFi",
"1": "yunyiデバイス",
"2": "クラウドデバイス",
"3": "ZigBee",
"4": "webSocket",
"5": "仮想デバイス",
"6": "BLE",
"7": "ローカルAP",
"8": "WiFi+BLE",
"9": "その他",
"10": "機能プラグイン",
"11": "セルラーネットワーク",
"12": "ケーブル",
"13": "NB-IoT",
"14": "サードパーティクラウドアクセス",
"15": "赤外線リモコンデバイス",
"16": "BLE-Mesh",
"17": "仮想デバイスグループ",
"18": "ゲートウェイサブデバイス",
"19": "セキュリティレベルゲートウェイサブデバイス",
"22": "PLC",
"23": "ケーブルのみ",
"24": "Matter",
"25": "WiFi+セルラーネットワーク"
},
"room_name_rule": {
"none": "同期しない",
"home_room": "家の名前と部屋の名前 (Xiaomi Home 寝室)",
Expand All @@ -18,6 +54,11 @@
"enable": "有効",
"disable": "無効"
},
"device_state": {
"add": "追加",
"del": "利用不可",
"offline": "オフライン"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[注意]** 複数のネットワークカードが同じネットワークに接続されている可能性があります。選択に注意してください。",
"net_unavailable": "インターフェースが利用できません"
Expand Down
45 changes: 43 additions & 2 deletions custom_components/xiaomi_home/miot/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,48 @@
"config": {
"other": {
"devices": "Apparaten",
"found_central_gateway": ", Lokale centrale hub-gateway gevonden"
"found_central_gateway": ", Lokale centrale hub-gateway gevonden",
"without_room": "Niet toegewezen kamer",
"no_display": "Niet weergeven"
},
"control_mode": {
"auto": "Automatisch",
"cloud": "Cloud"
},
"statistics_logic": {
"or": "OF-logica",
"and": "EN-logica"
},
"filter_mode": {
"exclude": "Uitsluiten",
"include": "Inclusief"
},
"connect_type": {
"0": "WiFi",
"1": "yunyi-apparaat",
"2": "Cloudapparaat",
"3": "ZigBee",
"4": "webSocket",
"5": "Virtueel apparaat",
"6": "BLE",
"7": "Lokaal AP",
"8": "WiFi+BLE",
"9": "Andere",
"10": "Functieplug-in",
"11": "Cellulair netwerk",
"12": "Kabel",
"13": "NB-IoT",
"14": "Toegang van derden tot de cloud",
"15": "Infrarood afstandsbedieningsapparaat",
"16": "BLE-Mesh",
"17": "Virtuele apparaatgroep",
"18": "Gateway sub-apparaat",
"19": "Beveiligingsniveau gateway sub-apparaat",
"22": "PLC",
"23": "Alleen kabel",
"24": "Matter",
"25": "WiFi+Cellulair netwerk"
},
"room_name_rule": {
"none": "Niet synchroniseren",
"home_room": "Huisnaam en Kamernaam (Xiaomi Home Slaapkamer)",
Expand All @@ -18,6 +54,11 @@
"enable": "Inschakelen",
"disable": "Uitschakelen"
},
"device_state": {
"add": "Toevoegen",
"del": "Niet beschikbaar",
"offline": "Offline"
},
"lan_ctrl_config": {
"notice_net_dup": "\r\n**[Let op]** Meerdere netwerkkaarten gedetecteerd die mogelijk zijn verbonden met hetzelfde netwerk. Let op bij de selectie.",
"net_unavailable": "Interface niet beschikbaar"
Expand Down Expand Up @@ -92,4 +133,4 @@
"-706014006": "Apparaatbeschrijving niet gevonden"
}
}
}
}
Loading

0 comments on commit 29b7489

Please sign in to comment.