From 86e20ce9b5517ad87ecbdb82142d9fdcded0c914 Mon Sep 17 00:00:00 2001 From: Necroneco Date: Fri, 1 Nov 2024 23:11:12 +0800 Subject: [PATCH 1/2] Add translations for entity names --- .../xiaomi_gateway3/hass/entity.py | 7 +- .../hass/entity_description.py | 99 ++++--- custom_components/xiaomi_gateway3/select.py | 2 - .../xiaomi_gateway3/translations/en.json | 192 ++++++++++++ .../xiaomi_gateway3/translations/hu.json | 192 ++++++++++++ .../xiaomi_gateway3/translations/pl.json | 237 +++++++++++++++ .../xiaomi_gateway3/translations/pt-BR.json | 237 +++++++++++++++ .../xiaomi_gateway3/translations/ro.json | 237 +++++++++++++++ .../xiaomi_gateway3/translations/ru.json | 274 +++++++++++++++--- .../xiaomi_gateway3/translations/ua.json | 237 +++++++++++++++ .../xiaomi_gateway3/translations/zh-Hans.json | 192 ++++++++++++ .../xiaomi_gateway3/translations/zh-Hant.json | 206 ++++++++++++- 12 files changed, 2022 insertions(+), 90 deletions(-) diff --git a/custom_components/xiaomi_gateway3/hass/entity.py b/custom_components/xiaomi_gateway3/hass/entity.py index e49a9f9a4..afbb4a557 100644 --- a/custom_components/xiaomi_gateway3/hass/entity.py +++ b/custom_components/xiaomi_gateway3/hass/entity.py @@ -69,11 +69,16 @@ def __init__(self, device: "XDevice", conv: "BaseConv"): via_device=via_device, ) self._attr_has_entity_name = True - self._attr_name = attr_human_name(conv.attr) self._attr_should_poll = False self._attr_unique_id = f"{device.uid}_{conv.attr}" setup_entity_description(self, conv) + if ( + not hasattr(self, "_attr_name") + and not hasattr(self, "_attr_translation_key") + and not self._default_to_device_class_name() + ): # unnamed + self._attr_name = attr_human_name(conv.attr) if entity_name := device.extra.get("entity_name"): if entity_name.endswith(conv.attr): diff --git a/custom_components/xiaomi_gateway3/hass/entity_description.py b/custom_components/xiaomi_gateway3/hass/entity_description.py index 1f318387f..46bffb280 100644 --- a/custom_components/xiaomi_gateway3/hass/entity_description.py +++ b/custom_components/xiaomi_gateway3/hass/entity_description.py @@ -25,6 +25,7 @@ from homeassistant.helpers.entity import Entity, EntityCategory from ..core.converters.base import BaseConv +from ..core.converters.const import ENTITY_LAZY if (MAJOR_VERSION, MINOR_VERSION) >= (2024, 11): from homeassistant.const import UnitOfConductivity @@ -56,6 +57,7 @@ "statistics": "_attr_state_class", "units": "_attr_native_unit_of_measurement", "visible": "_attr_entity_registry_visible_default", + "translation_key": "_attr_translation_key", } # description with class should be used with "domain.attr" @@ -68,73 +70,83 @@ "sensor.illuminance": {"class": SENSOR.ILLUMINANCE, "units": LIGHT_LUX}, "sensor.humidity": {"class": SENSOR.HUMIDITY, "units": PERCENTAGE}, "sensor.moisture": {"class": SENSOR.MOISTURE, "units": PERCENTAGE}, - "sensor.power": {"class": SENSOR.POWER, "units": UnitOfPower.WATT}, + "sensor.power": {"class": SENSOR.POWER, "units": UnitOfPower.WATT, "translation_key": "power"}, "sensor.pressure": {"class": SENSOR.PRESSURE, "units": UnitOfPressure.HPA}, "sensor.temperature": {"class": SENSOR.TEMPERATURE, "units": CELSIUS}, "sensor.voltage": {"class": SENSOR.VOLTAGE, "units": UnitOfElectricPotential.VOLT}, ## # binary sensors with device class - "binary_sensor.contact": {"class": BinarySensorDeviceClass.DOOR}, - "binary_sensor.latch": {"class": BinarySensorDeviceClass.LOCK}, + "binary_sensor.contact": {"class": BinarySensorDeviceClass.DOOR, "translation_key": "contact"}, + "binary_sensor.latch": {"class": BinarySensorDeviceClass.LOCK, "translation_key": "latch"}, "binary_sensor.moisture": {"class": BinarySensorDeviceClass.MOISTURE}, "binary_sensor.plug_detection": {"class": BinarySensorDeviceClass.PLUG}, - "binary_sensor.pressure": {"class": BinarySensorDeviceClass.VIBRATION}, - "binary_sensor.reverse": {"class": BinarySensorDeviceClass.LOCK}, - "binary_sensor.square": {"class": BinarySensorDeviceClass.LOCK}, + "binary_sensor.pressure": {"class": BinarySensorDeviceClass.VIBRATION, "translation_key": "pressure"}, + "binary_sensor.reverse": {"class": BinarySensorDeviceClass.LOCK, "translation_key": "reverse"}, + "binary_sensor.square": {"class": BinarySensorDeviceClass.LOCK, "translation_key": "square"}, "binary_sensor.water_leak": {"class": BinarySensorDeviceClass.MOISTURE}, ## # sensors without device class - "action": {"icon": "mdi:bell"}, - "conductivity": {"icon": "mdi:flower", "units": CONDUCTIVITY}, - "formaldehyde": {"units": CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER}, - "gas_density": {"icon": "mdi:google-circles-communities", "units": "% LEL"}, - "rssi": {"units": SIGNAL_STRENGTH_DECIBELS_MILLIWATT}, - "smoke_density": {"icon": "mdi:google-circles-communities", "units": "% obs/ft"}, - "supply": {"icon": "mdi:gauge", "units": PERCENTAGE}, - "tvoc": {"icon": "mdi:cloud", "units": CONCENTRATION_PARTS_PER_BILLION}, - "eco_two": {"name": "eCO2", "icon": "mdi:molecule-co2", "units": CONCENTRATION_PARTS_PER_MILLION}, + "action": {"icon": "mdi:bell", "translation_key": "action"}, + "conductivity": {"icon": "mdi:flower", "units": CONDUCTIVITY, "translation_key": "conductivity"}, + "formaldehyde": {"units": CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER, "translation_key": "formaldehyde"}, + "gas_density": {"icon": "mdi:google-circles-communities", "units": "% LEL", "translation_key": "gas_density"}, + "rssi": {"units": SIGNAL_STRENGTH_DECIBELS_MILLIWATT, "translation_key": "rssi"}, + "smoke_density": {"icon": "mdi:google-circles-communities", "units": "% obs/ft", "translation_key": "smoke_density"}, + "supply": {"icon": "mdi:gauge", "units": PERCENTAGE, "translation_key": "supply"}, + "tvoc": {"icon": "mdi:cloud", "units": CONCENTRATION_PARTS_PER_BILLION, "translation_key": "tvoc"}, + "eco_two": {"icon": "mdi:molecule-co2", "units": CONCENTRATION_PARTS_PER_MILLION, "translation_key": "e_co2"}, ## # stats sensors "binary_sensor.gateway": { "class": BinarySensorDeviceClass.CONNECTIVITY, "icon": "mdi:router-wireless", + "translation_key": "gateway", }, "binary_sensor.ble": { "class": BinarySensorDeviceClass.CONNECTIVITY, "category": DIAGNOSTIC, "icon": "mdi:bluetooth", + "translation_key": "ble", }, "binary_sensor.mesh": { "class": BinarySensorDeviceClass.CONNECTIVITY, "category": DIAGNOSTIC, "icon": "mdi:bluetooth", + "translation_key": "mesh", }, "binary_sensor.zigbee": { "class": BinarySensorDeviceClass.CONNECTIVITY, "category": DIAGNOSTIC, "icon": "mdi:zigbee", + "translation_key": "zigbee", }, "sensor.ble": { "class": SENSOR.TIMESTAMP, "category": DIAGNOSTIC, "icon": "mdi:bluetooth", + "translation_key": "ble", }, "sensor.mesh": { "class": SENSOR.TIMESTAMP, "category": DIAGNOSTIC, "icon": "mdi:bluetooth", + "translation_key": "mesh", }, "sensor.zigbee": { "class": SENSOR.TIMESTAMP, "category": DIAGNOSTIC, "icon": "mdi:zigbee", + "translation_key": "zigbee", }, ## # main controls - "alarm_trigger": {"icon": "mdi:alarm-bell"}, - "fan": {"icon": "mdi:fan"}, - "outlet": {"icon": "mdi:power-socket-us"}, - "plug": {"icon": "mdi:power-plug"}, + "alarm_trigger": {"icon": "mdi:alarm-bell", "translation_key": "alarm_trigger"}, + "fan": {"icon": "mdi:fan", "translation_key": "fan"}, + "light.light": {"name": None}, + "switch.channel": {"class": SwitchDeviceClass.SWITCH, "translation_key": "channel"}, + "switch.outlet": {"class": SwitchDeviceClass.OUTLET, "icon": "mdi:power-socket-us", "translation_key": "outlet"}, + "switch.plug": {"class": SwitchDeviceClass.OUTLET, "icon": "mdi:power-plug", "translation_key": "plug"}, + "switch.switch": {"class": SwitchDeviceClass.SWITCH, "translation_key": "switch"}, "usb": {"icon": "mdi:usb-port"}, ## # batteries and energy sensors @@ -148,11 +160,13 @@ "units": PERCENTAGE, "category": DIAGNOSTIC, "enabled": False, + "translation_key": "battery_original", }, "sensor.battery_voltage": { "class": SENSOR.VOLTAGE, "units": UnitOfElectricPotential.MILLIVOLT, "category": DIAGNOSTIC, + "translation_key": "battery_voltage", }, "binary_sensor.battery_charging": { "class": BinarySensorDeviceClass.BATTERY_CHARGING, @@ -168,28 +182,29 @@ "class": SENSOR.ENERGY, "statistics": SensorStateClass.TOTAL, "units": UnitOfEnergy.KILO_WATT_HOUR, + "translation_key": "power_consumption", }, ## # CONFIG controls - "backlight": {"category": CONFIG, "enabled": False}, - "blind_time": {"category": CONFIG, "enabled": False}, - "charge_protect": {"category": CONFIG, "enabled": False}, - "child_lock": {"category": CONFIG, "enabled": False, "icon": "mdi:baby-carriage"}, - "display_unit": {"category": CONFIG, "enabled": False}, - "flex_switch": {"category": CONFIG, "enabled": False}, - "led": {"category": CONFIG, "enabled": False, "icon": "mdi:led-off"}, - "led_reverse": {"category": CONFIG, "enabled": False, "icon": "mdi:led-off"}, - "mode": {"category": CONFIG, "enabled": False, "icon": "mdi:cog"}, - "motor_reverse": {"category": CONFIG, "enabled": False}, - "motor_speed": {"category": CONFIG, "enabled": False}, - "power_off_memory": {"category": CONFIG, "enabled": False}, - "power_on_state": {"category": CONFIG, "enabled": False}, - "sensitivity": {"category": CONFIG, "enabled": False}, - "wireless": {"category": CONFIG, "enabled": False}, + "backlight": {"category": CONFIG, "enabled": False, "translation_key": "backlight"}, + "blind_time": {"category": CONFIG, "enabled": False, "translation_key": "blind_time"}, + "charge_protect": {"category": CONFIG, "enabled": False, "translation_key": "charge_protect"}, + "child_lock": {"category": CONFIG, "enabled": False, "icon": "mdi:baby-carriage", "translation_key": "child_lock"}, + "display_unit": {"category": CONFIG, "enabled": False, "translation_key": "display_unit"}, + "flex_switch": {"category": CONFIG, "enabled": False, "translation_key": "flex_switch"}, + "led": {"category": CONFIG, "enabled": False, "icon": "mdi:led-off", "translation_key": "led"}, + "led_reverse": {"category": CONFIG, "enabled": False, "icon": "mdi:led-off", "translation_key": "led_reverse"}, + "mode": {"category": CONFIG, "enabled": False, "icon": "mdi:cog", "translation_key": "mode"}, + "motor_reverse": {"category": CONFIG, "enabled": False, "translation_key": "motor_reverse"}, + "motor_speed": {"category": CONFIG, "enabled": False, "translation_key": "motor_speed"}, + "power_off_memory": {"category": CONFIG, "enabled": False, "translation_key": "power_off_memory"}, + "power_on_state": {"category": CONFIG, "enabled": False, "translation_key": "power_on_state"}, + "sensitivity": {"category": CONFIG, "enabled": False, "translation_key": "sensitivity"}, + "wireless": {"category": CONFIG, "enabled": False, "translation_key": "wireless"}, ## # DIAGNOSTIC controls - "command": {"category": DIAGNOSTIC, "icon": "mdi:apple-keyboard-command"}, - "data": {"category": DIAGNOSTIC, "icon": "mdi:information-box"}, + "command": {"category": DIAGNOSTIC, "icon": "mdi:apple-keyboard-command", "translation_key": "command"}, + "data": {"category": DIAGNOSTIC, "icon": "mdi:information-box", "translation_key": "data"}, ## # CONFIG and DIAGNOSTIC sensors "sensor.chip_temperature": { @@ -197,14 +212,16 @@ "units": UnitOfTemperature.CELSIUS, "category": DIAGNOSTIC, "enabled": False, + "translation_key": "chip_temperature", }, - "fault": {"category": DIAGNOSTIC}, + "fault": {"category": DIAGNOSTIC, "translation_key": "fault"}, "sensor.idle_time": { "class": SENSOR.DURATION, "icon": "mdi:timer", "units": UnitOfTime.SECONDS, "category": DIAGNOSTIC, "enabled": False, + "translation_key": "idle_time", }, } @@ -220,6 +237,7 @@ def setup_entity_description(entity: Entity, conv: BaseConv) -> bool: # 1. auto match entity description based on converter domain and attr name key = conv.attr.rstrip("_01234567890") # remove tail _1, _2, _3 + tail_index = conv.attr[len(key)+1:] # get tail 1, 2, 3 domain_key = f"{conv.domain}.{key}" desc = ENTITY_DESCRIPTIONS.get(domain_key) or ENTITY_DESCRIPTIONS.get(key) @@ -228,7 +246,7 @@ def setup_entity_description(entity: Entity, conv: BaseConv) -> bool: desc = desc | conv.entity if desc else conv.entity # 3. auto match only device_class based on converter domain - if not desc: + if not desc or desc == ENTITY_LAZY: if domain_class := DOMAIN_CLASSES.get(conv.domain): if key in iter(domain_class): entity._attr_device_class = domain_class(key) @@ -236,13 +254,16 @@ def setup_entity_description(entity: Entity, conv: BaseConv) -> bool: return False for k, v in desc.items(): - if k == "lazy" or v is None: + if k == "lazy" or (v is None and k != "name"): continue if k == "category" and type(v) is str: v = EntityCategory(v) elif k == "class" and type(v) is str: if domain_class := DOMAIN_CLASSES.get(conv.domain): v = domain_class(v) + elif k == "translation_key" and tail_index: + v = f"{v}_n" + setattr(entity, "_attr_translation_placeholders", {"n": tail_index}) setattr(entity, ENTITY_KEYS.get(k) or k, v) # sensor with unit_of_measurement and without state_class will be MEASUREMENT diff --git a/custom_components/xiaomi_gateway3/select.py b/custom_components/xiaomi_gateway3/select.py index 6f7b6565c..006f878f3 100644 --- a/custom_components/xiaomi_gateway3/select.py +++ b/custom_components/xiaomi_gateway3/select.py @@ -57,7 +57,6 @@ class XCommandSelect(XEntity, SelectEntity): def on_init(self): self._attr_current_option = CMD_NONE self._attr_options = [CMD_NONE, CMD_INFO] - self._attr_translation_key = self.attr # noinspection PyTypeChecker self.gw = self.device.gateways[0] @@ -176,7 +175,6 @@ class XDataSelect(XEntity, SelectEntity): def on_init(self): self._attr_current_option = None self._attr_options = [] - self._attr_translation_key = self.attr self.listen_attrs = { "data", diff --git a/custom_components/xiaomi_gateway3/translations/en.json b/custom_components/xiaomi_gateway3/translations/en.json index 61d4d5e29..34d2e124e 100644 --- a/custom_components/xiaomi_gateway3/translations/en.json +++ b/custom_components/xiaomi_gateway3/translations/en.json @@ -65,8 +65,57 @@ } }, "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, "command": { + "name": "Command", "state": { "info": "Device info", "update": "Device update", @@ -88,6 +137,7 @@ } }, "data": { + "name": "Data", "state": { "enabled": "Enabled", "disabled": "Disabled", @@ -106,6 +156,148 @@ "original": "Original", "custom": "Custom" } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" } } } diff --git a/custom_components/xiaomi_gateway3/translations/hu.json b/custom_components/xiaomi_gateway3/translations/hu.json index d5fdc8ab3..37313596b 100644 --- a/custom_components/xiaomi_gateway3/translations/hu.json +++ b/custom_components/xiaomi_gateway3/translations/hu.json @@ -72,8 +72,57 @@ } }, "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, "command": { + "name": "Command", "state": { "pair": "Zigbee párosítás", "bind": "Zigbee rögzítés", @@ -87,6 +136,7 @@ } }, "data": { + "name": "Data", "state": { "enabled": "Engedélyezés", "disabled": "Letiltás", @@ -105,6 +155,148 @@ "original": "Eredeti", "custom": "Egyéni" } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" } } } diff --git a/custom_components/xiaomi_gateway3/translations/pl.json b/custom_components/xiaomi_gateway3/translations/pl.json index e7c1c125c..ca598e490 100644 --- a/custom_components/xiaomi_gateway3/translations/pl.json +++ b/custom_components/xiaomi_gateway3/translations/pl.json @@ -70,5 +70,242 @@ "button_both_13": "Naciśnięcie przycisków 1 i 3", "button_both_23": "Naciśnięcie przycisków 2 i 3" } + }, + "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, + "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "command": { + "name": "Command", + "state": { + "info": "Device info", + "update": "Device update", + "pair": "Zigbee pairing", + "force_pair": "Zigbee force pairing", + "bind": "Zigbee binding", + "ota": "Zigbee OTA", + "reconfig": "Zigbee reconfig", + "parent_scan": "Zigbee parent scan", + "firmware_lock": "Gateway firmware lock", + "reboot": "Gateway reboot", + "run_ftp": "Gateway run FTP", + "flash_ezsp": "Zigbee flash EZSP", + "openmiio_restart": "OpenmiIO restart", + "disable": "Gateway disable", + "enable": "Gateway enable", + "rejoin": "Zigbee rejoin", + "remove": "Zigbee delete" + } + }, + "data": { + "name": "Data", + "state": { + "enabled": "Enabled", + "disabled": "Disabled", + "unknown": "Unknown", + "ok": "OK", + "error": "ERROR", + "permit_join": "Ready to join", + "stop_join": "Pairing stopped", + "cancel": "Cancel", + "key_secure": "Send network key (secure)", + "key_legacy": "Send network key (legacy)", + "no_firmware": "No firmware", + "bind": "Bind", + "unbind": "Unbind", + "no_devices": "No devices", + "original": "Original", + "custom": "Custom" + } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" + } + } } } diff --git a/custom_components/xiaomi_gateway3/translations/pt-BR.json b/custom_components/xiaomi_gateway3/translations/pt-BR.json index 493c6a139..4c820017d 100644 --- a/custom_components/xiaomi_gateway3/translations/pt-BR.json +++ b/custom_components/xiaomi_gateway3/translations/pt-BR.json @@ -70,5 +70,242 @@ "button_both_13": "1º e 3º botão pressionado", "button_both_23": "2º e 3º botão pressionado" } + }, + "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, + "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "command": { + "name": "Command", + "state": { + "info": "Device info", + "update": "Device update", + "pair": "Zigbee pairing", + "force_pair": "Zigbee force pairing", + "bind": "Zigbee binding", + "ota": "Zigbee OTA", + "reconfig": "Zigbee reconfig", + "parent_scan": "Zigbee parent scan", + "firmware_lock": "Gateway firmware lock", + "reboot": "Gateway reboot", + "run_ftp": "Gateway run FTP", + "flash_ezsp": "Zigbee flash EZSP", + "openmiio_restart": "OpenmiIO restart", + "disable": "Gateway disable", + "enable": "Gateway enable", + "rejoin": "Zigbee rejoin", + "remove": "Zigbee delete" + } + }, + "data": { + "name": "Data", + "state": { + "enabled": "Enabled", + "disabled": "Disabled", + "unknown": "Unknown", + "ok": "OK", + "error": "ERROR", + "permit_join": "Ready to join", + "stop_join": "Pairing stopped", + "cancel": "Cancel", + "key_secure": "Send network key (secure)", + "key_legacy": "Send network key (legacy)", + "no_firmware": "No firmware", + "bind": "Bind", + "unbind": "Unbind", + "no_devices": "No devices", + "original": "Original", + "custom": "Custom" + } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" + } + } } } \ No newline at end of file diff --git a/custom_components/xiaomi_gateway3/translations/ro.json b/custom_components/xiaomi_gateway3/translations/ro.json index 3d2b615eb..1d2e5f521 100644 --- a/custom_components/xiaomi_gateway3/translations/ro.json +++ b/custom_components/xiaomi_gateway3/translations/ro.json @@ -70,5 +70,242 @@ "button_both_13": "Primul si al 3-lea buton apasat", "button_both_23": "Al 2-lea si al 3-lea buton apasat" } + }, + "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, + "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "command": { + "name": "Command", + "state": { + "info": "Device info", + "update": "Device update", + "pair": "Zigbee pairing", + "force_pair": "Zigbee force pairing", + "bind": "Zigbee binding", + "ota": "Zigbee OTA", + "reconfig": "Zigbee reconfig", + "parent_scan": "Zigbee parent scan", + "firmware_lock": "Gateway firmware lock", + "reboot": "Gateway reboot", + "run_ftp": "Gateway run FTP", + "flash_ezsp": "Zigbee flash EZSP", + "openmiio_restart": "OpenmiIO restart", + "disable": "Gateway disable", + "enable": "Gateway enable", + "rejoin": "Zigbee rejoin", + "remove": "Zigbee delete" + } + }, + "data": { + "name": "Data", + "state": { + "enabled": "Enabled", + "disabled": "Disabled", + "unknown": "Unknown", + "ok": "OK", + "error": "ERROR", + "permit_join": "Ready to join", + "stop_join": "Pairing stopped", + "cancel": "Cancel", + "key_secure": "Send network key (secure)", + "key_legacy": "Send network key (legacy)", + "no_firmware": "No firmware", + "bind": "Bind", + "unbind": "Unbind", + "no_devices": "No devices", + "original": "Original", + "custom": "Custom" + } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" + } + } } } \ No newline at end of file diff --git a/custom_components/xiaomi_gateway3/translations/ru.json b/custom_components/xiaomi_gateway3/translations/ru.json index 2698714b1..54b4c7173 100644 --- a/custom_components/xiaomi_gateway3/translations/ru.json +++ b/custom_components/xiaomi_gateway3/translations/ru.json @@ -64,48 +64,240 @@ } }, "entity": { - "select": { - "command": { - "state": { - "info": "Информация об устройстве", - "update": "Обновление устройства", - "pair": "Сопряжение Zigbee", - "force_pair": "Принудительное сопряжение Zigbee", - "bind": "Привязка Zigbee", - "ota": "Zigbee OTA", - "reconfig": "Переконфигурация Zigbee", - "parent_scan": "Сканирование родительских устройств Zigbee", - "firmware_lock": "Блокировка прошивки шлюза", - "reboot": "Перезагрузка шлюза", - "run_ftp": "Запуск FTP на шлюзе", - "flash_ezsp": "Прошивка EZSP Zigbee", - "openmiio_restart": "Перезагрузка OpenmiIO", - "disable": "Отключение шлюза", - "enable": "Включение шлюза", - "rejoin": "Повторное подключение Zigbee", - "remove": "Удаление устройства" - } - }, - "data": { - "state": { - "enabled": "Включено", - "disabled": "Отключено", - "unknown": "Неизвестно", - "ok": "OK", - "error": "ОШИБКА", - "permit_join": "Готов к подключению", - "stop_join": "Сопряжение остановлено", - "cancel": "Отмена", - "key_secure": "Отправить сетевой ключ (безопасный)", - "key_legacy": "Отправить сетевой ключ (устаревший)", - "no_firmware": "Нет прошивки", - "bind": "Привязать", - "unbind": "Отвязать", - "no_devices": "Нет устройств", - "original": "Оригинальный", - "custom": "Пользовательский" - } + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, + "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "command": { + "name": "Command", + "state": { + "info": "Информация об устройстве", + "update": "Обновление устройства", + "pair": "Сопряжение Zigbee", + "force_pair": "Принудительное сопряжение Zigbee", + "bind": "Привязка Zigbee", + "ota": "Zigbee OTA", + "reconfig": "Переконфигурация Zigbee", + "parent_scan": "Сканирование родительских устройств Zigbee", + "firmware_lock": "Блокировка прошивки шлюза", + "reboot": "Перезагрузка шлюза", + "run_ftp": "Запуск FTP на шлюзе", + "flash_ezsp": "Прошивка EZSP Zigbee", + "openmiio_restart": "Перезагрузка OpenmiIO", + "disable": "Отключение шлюза", + "enable": "Включение шлюза", + "rejoin": "Повторное подключение Zigbee", + "remove": "Удаление устройства" + } + }, + "data": { + "name": "Data", + "state": { + "enabled": "Включено", + "disabled": "Отключено", + "unknown": "Неизвестно", + "ok": "OK", + "error": "ОШИБКА", + "permit_join": "Готов к подключению", + "stop_join": "Сопряжение остановлено", + "cancel": "Отмена", + "key_secure": "Отправить сетевой ключ (безопасный)", + "key_legacy": "Отправить сетевой ключ (устаревший)", + "no_firmware": "Нет прошивки", + "bind": "Привязать", + "unbind": "Отвязать", + "no_devices": "Нет устройств", + "original": "Оригинальный", + "custom": "Пользовательский" } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" } } + } } diff --git a/custom_components/xiaomi_gateway3/translations/ua.json b/custom_components/xiaomi_gateway3/translations/ua.json index 26a606c6e..609aaedd5 100644 --- a/custom_components/xiaomi_gateway3/translations/ua.json +++ b/custom_components/xiaomi_gateway3/translations/ua.json @@ -69,5 +69,242 @@ "button_both_13": "Натискання першої і третьої кнопок", "button_both_23": "Натискання другої і третьої кнопок" } + }, + "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, + "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "command": { + "name": "Command", + "state": { + "info": "Device info", + "update": "Device update", + "pair": "Zigbee pairing", + "force_pair": "Zigbee force pairing", + "bind": "Zigbee binding", + "ota": "Zigbee OTA", + "reconfig": "Zigbee reconfig", + "parent_scan": "Zigbee parent scan", + "firmware_lock": "Gateway firmware lock", + "reboot": "Gateway reboot", + "run_ftp": "Gateway run FTP", + "flash_ezsp": "Zigbee flash EZSP", + "openmiio_restart": "OpenmiIO restart", + "disable": "Gateway disable", + "enable": "Gateway enable", + "rejoin": "Zigbee rejoin", + "remove": "Zigbee delete" + } + }, + "data": { + "name": "Data", + "state": { + "enabled": "Enabled", + "disabled": "Disabled", + "unknown": "Unknown", + "ok": "OK", + "error": "ERROR", + "permit_join": "Ready to join", + "stop_join": "Pairing stopped", + "cancel": "Cancel", + "key_secure": "Send network key (secure)", + "key_legacy": "Send network key (legacy)", + "no_firmware": "No firmware", + "bind": "Bind", + "unbind": "Unbind", + "no_devices": "No devices", + "original": "Original", + "custom": "Custom" + } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" + } + } } } \ No newline at end of file diff --git a/custom_components/xiaomi_gateway3/translations/zh-Hans.json b/custom_components/xiaomi_gateway3/translations/zh-Hans.json index 31da69e35..74acd3c57 100644 --- a/custom_components/xiaomi_gateway3/translations/zh-Hans.json +++ b/custom_components/xiaomi_gateway3/translations/zh-Hans.json @@ -72,8 +72,57 @@ } }, "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "压力" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, "command": { + "name": "Command", "state": { "pair": "Zigbee配对", "bind": "Zigbee绑定", @@ -88,6 +137,7 @@ } }, "data": { + "name": "Data", "state": { "enabled": "已启用", "disabled": "已禁用", @@ -106,6 +156,148 @@ "original": "原始固件", "custom": "自定义固件" } + }, + "display_unit": { + "name": "显示单位" + }, + "mode": { + "name": "模式" + }, + "mode_n": { + "name": "模式 {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "断电后通电状态" + }, + "power_on_state_n": { + "name": "第{n}路断电后通电状态" + }, + "sensitivity": { + "name": "灵敏度" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "电池电压" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "芯片温度" + }, + "conductivity": { + "name": "电导率" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "甲醛" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "功率" + }, + "power_consumption": { + "name": "功耗" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "开关" + }, + "channel_n": { + "name": "第{n}路开关" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "童锁" + }, + "fan": { + "name": "风扇" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED反转" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "电机反转" + }, + "outlet": { + "name": "插座" + }, + "plug": { + "name": "插座" + }, + "power_off_memory": { + "name": "断电记忆" + }, + "switch": { + "name": "开关" + }, + "switch_n": { + "name": "第{n}路开关" + }, + "wireless": { + "name": "转无线开关" + }, + "wireless_n": { + "name": "第{n}路转无线开关" } } } diff --git a/custom_components/xiaomi_gateway3/translations/zh-Hant.json b/custom_components/xiaomi_gateway3/translations/zh-Hant.json index b4741addd..61f095491 100644 --- a/custom_components/xiaomi_gateway3/translations/zh-Hant.json +++ b/custom_components/xiaomi_gateway3/translations/zh-Hant.json @@ -4,7 +4,7 @@ "no_servers": "請至少選擇一個伺服器", "cant_login": "無法登入,請確認使用者名稱與密碼", "cant_connect": "無法連線至網關", - "no_key": "因網關韌體缺少金鑰(Key)而無法支援", + "no_key": "因網關韌體缺少金鑰(Key)而無法支援", "wrong_model": "網關型號不支援", "wrong_token": "網關Token錯誤", "wrong_telnet": "開啟 Telnet 指令錯誤", @@ -50,8 +50,8 @@ "data": { "host": "網關IP", "token": "Token", - "key": "Key", - "telnet_cmd": "開啟Telnet指令", + "key": "Key", + "telnet_cmd": "開啟Telnet指令", "ble": "支援的藍牙裝置", "stats": "新增統計資料感測器", "debug": "偵錯日誌" @@ -75,13 +75,62 @@ } }, "entity": { + "binary_sensor": { + "ble": { + "name": "BLE" + }, + "contact": { + "name": "Contact" + }, + "fault": { + "name": "Fault" + }, + "gateway": { + "name": "Gateway" + }, + "latch": { + "name": "Latch" + }, + "mesh": { + "name": "Mesh" + }, + "pressure": { + "name": "Pressure" + }, + "reverse": { + "name": "Reverse" + }, + "square": { + "name": "Square" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "light": { + "led": { + "name": "LED" + } + }, + "number": { + "blind_time": { + "name": "Blind Time" + } + }, "select": { + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, "command": { + "name": "Command", "state": { - "info": "裝置資訊", - "update": "裝置更新", + "info": "裝置資訊", + "update": "裝置更新", "pair": "Zigbee配對", - "force_pair": "Zigbee強制配對", + "force_pair": "Zigbee強制配對", "bind": "Zigbee绑定", "ota": "Zigbee OTA", "reconfig": "Zigbee重新設定", @@ -94,10 +143,11 @@ "disable": "網關停用", "enable": "網關啟用", "rejoin": "Zigbee重新加入", - "remove": "Zigbee刪除" + "remove": "Zigbee刪除" } }, "data": { + "name": "Data", "state": { "enabled": "已啟用", "disabled": "已停用", @@ -116,6 +166,148 @@ "original": "原始韌體", "custom": "客製韌體" } + }, + "display_unit": { + "name": "Display Unit" + }, + "mode": { + "name": "Mode" + }, + "mode_n": { + "name": "Mode {n}" + }, + "motor_speed": { + "name": "Motor Speed" + }, + "power_on_state": { + "name": "Power On State" + }, + "power_on_state_n": { + "name": "Power On State {n}" + }, + "sensitivity": { + "name": "Sensitivity" + } + }, + "sensor": { + "action": { + "name": "Action" + }, + "battery_original": { + "name": "Battery Original" + }, + "battery_voltage": { + "name": "Battery Voltage" + }, + "ble": { + "name": "BLE" + }, + "chip_temperature": { + "name": "Chip Temperature" + }, + "conductivity": { + "name": "Conductivity" + }, + "e_co2": { + "name": "eCO2" + }, + "fault": { + "name": "Fault" + }, + "formaldehyde": { + "name": "Formaldehyde" + }, + "gas_density": { + "name": "Gas Density" + }, + "idle_time": { + "name": "Idle Time" + }, + "mesh": { + "name": "Mesh" + }, + "power": { + "name": "Power" + }, + "power_consumption": { + "name": "Power Consumption" + }, + "rssi": { + "name": "RSSI" + }, + "smoke_density": { + "name": "Smoke Density" + }, + "supply": { + "name": "Supply" + }, + "tvoc": { + "name": "TVOC" + }, + "zigbee": { + "name": "Zigbee" + } + }, + "switch": { + "alarm_trigger": { + "name": "Alarm Trigger" + }, + "backlight": { + "name": "Backlight" + }, + "backlight_n": { + "name": "Backlight {n}" + }, + "channel": { + "name": "Channel" + }, + "channel_n": { + "name": "Channel {n}" + }, + "charge_protect": { + "name": "Charge Protect" + }, + "child_lock": { + "name": "Child Lock" + }, + "fan": { + "name": "Fan" + }, + "flex_switch": { + "name": "Flex Switch" + }, + "led": { + "name": "LED" + }, + "led_reverse": { + "name": "LED Reverse" + }, + "mode": { + "name": "Mode" + }, + "motor_reverse": { + "name": "Motor Reverse" + }, + "outlet": { + "name": "Outlet" + }, + "plug": { + "name": "Plug" + }, + "power_off_memory": { + "name": "Power Off Memory" + }, + "switch": { + "name": "Switch" + }, + "switch_n": { + "name": "Switch {n}" + }, + "wireless": { + "name": "Wireless" + }, + "wireless_n": { + "name": "Wireless {n}" } } } From 60b8a08c0f8cd77e8e37f5ce340867aa0f046832 Mon Sep 17 00:00:00 2001 From: Necroneco Date: Sat, 2 Nov 2024 00:42:39 +0800 Subject: [PATCH 2/2] Update minimum HA version to 2024.2.0 --- hacs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacs.json b/hacs.json index 1619edf12..6a22f7975 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Xiaomi Gateway 3", - "homeassistant": "2023.2.0", + "homeassistant": "2024.2.0", "render_readme": true } \ No newline at end of file