diff --git a/custom_components/localtuya/manifest.json b/custom_components/localtuya/manifest.json new file mode 100644 index 00000000..95f34fba --- /dev/null +++ b/custom_components/localtuya/manifest.json @@ -0,0 +1,14 @@ +{ + "domain": "localtuya", + "name": "LocalTuya integration", + "codeowners": [ + "@rospogrigio", "@postlund" + ], + "config_flow": true, + "dependencies": [], + "documentation": "https://github.com/rospogrigio/localtuya/", + "iot_class": "local_push", + "issue_tracker": "https://github.com/rospogrigio/localtuya/issues", + "requirements": [], + "version": "5.2.3" +} diff --git a/custom_components/localtuya/services.yaml b/custom_components/localtuya/services.yaml new file mode 100644 index 00000000..f10af4a6 --- /dev/null +++ b/custom_components/localtuya/services.yaml @@ -0,0 +1,15 @@ +reload: + description: Reload localtuya and reconnect to all devices. + +set_dp: + description: Change the value of a datapoint (DP) + fields: + device_id: + description: Device ID of device to change datapoint value for + example: 11100118278aab4de001 + dp: + description: Datapoint index + example: 1 + value: + description: New value to set + example: False diff --git a/custom_components/localtuya/strings.json b/custom_components/localtuya/strings.json new file mode 100644 index 00000000..32f60400 --- /dev/null +++ b/custom_components/localtuya/strings.json @@ -0,0 +1,139 @@ +{ + "config": { + "abort": { + "already_configured": "Device has already been configured.", + "unsupported_device_type": "Unsupported device type!" + }, + "error": { + "cannot_connect": "Cannot connect to device. Verify that address is correct.", + "invalid_auth": "Failed to authenticate with device. Verify that device id and local key are correct.", + "unknown": "An unknown error occurred. See log for details.", + "switch_already_configured": "Switch with this ID has already been configured." + }, + "step": { + "user": { + "title": "Main Configuration", + "description": "Input the credentials for Tuya Cloud API.", + "data": { + "region": "API server region", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID" + } + }, + "power_outlet": { + "title": "Add subswitch", + "description": "You are about to add subswitch number `{number}`. If you want to add another, tick `Add another switch` before continuing.", + "data": { + "id": "ID", + "name": "Name", + "friendly_name": "Friendly name", + "current": "Current", + "current_consumption": "Current Consumption", + "voltage": "Voltage", + "add_another_switch": "Add another switch" + } + } + } + }, + "options": { + "step": { + "init": { + "title": "LocalTuya Configuration", + "description": "Please select the desired actionSSSS.", + "data": { + "add_device": "Add a new device", + "edit_device": "Edit a device", + "delete_device": "Delete a device", + "setup_cloud": "Reconfigure Cloud API account" + } + }, + "entity": { + "title": "Entity Configuration", + "description": "Editing entity with DPS `{id}` and platform `{platform}`.", + "data": { + "id": "ID", + "friendly_name": "Friendly name", + "current": "Current", + "current_consumption": "Current Consumption", + "voltage": "Voltage", + "commands_set": "Open_Close_Stop Commands Set", + "positioning_mode": "Positioning mode", + "current_position_dp": "Current Position (for *position* mode only)", + "set_position_dp": "Set Position (for *position* mode only)", + "position_inverted": "Invert 0-100 position (for *position* mode only)", + "span_time": "Full opening time, in secs. (for *timed* mode only)", + "unit_of_measurement": "Unit of Measurement", + "device_class": "Device Class", + "scaling": "Scaling Factor", + "state_on": "On Value", + "state_off": "Off Value", + "powergo_dp": "Power DP (Usually 25 or 2)", + "idle_status_value": "Idle Status (comma-separated)", + "returning_status_value": "Returning Status", + "docked_status_value": "Docked Status (comma-separated)", + "fault_dp": "Fault DP (Usually 11)", + "battery_dp": "Battery status DP (Usually 14)", + "mode_dp": "Mode DP (Usually 27)", + "modes": "Modes list", + "return_mode": "Return home mode", + "fan_speed_dp": "Fan speeds DP (Usually 30)", + "fan_speeds": "Fan speeds list (comma-separated)", + "clean_time_dp": "Clean Time DP (Usually 33)", + "clean_area_dp": "Clean Area DP (Usually 32)", + "clean_record_dp": "Clean Record DP (Usually 34)", + "locate_dp": "Locate DP (Usually 31)", + "paused_state": "Pause state (pause, paused, etc)", + "stop_status": "Stop status", + "brightness": "Brightness (only for white color)", + "brightness_lower": "Brightness Lower Value", + "brightness_upper": "Brightness Upper Value", + "color_temp": "Color Temperature", + "color_temp_reverse": "Color Temperature Reverse", + "color": "Color", + "color_mode": "Color Mode", + "color_temp_min_kelvin": "Minimum Color Temperature in K", + "color_temp_max_kelvin": "Maximum Color Temperature in K", + "music_mode": "Music mode available", + "scene": "Scene", + "fan_speed_control": "Fan Speed Control dps", + "fan_oscillating_control": "Fan Oscillating Control dps", + "fan_speed_min": "minimum fan speed integer", + "fan_speed_max": "maximum fan speed integer", + "fan_speed_ordered_list": "Fan speed modes list (overrides speed min/max)", + "fan_direction": "fan direction dps", + "fan_direction_forward": "forward dps string", + "fan_direction_reverse": "reverse dps string", + "fan_dps_type": "DP value type", + "current_temperature_dp": "Current Temperature", + "target_temperature_dp": "Target Temperature", + "temperature_step": "Temperature Step (optional)", + "max_temperature_dp": "Max Temperature (optional)", + "min_temperature_dp": "Min Temperature (optional)", + "precision": "Precision (optional, for DPs values)", + "target_precision": "Target Precision (optional, for DPs values)", + "temperature_unit": "Temperature Unit (optional)", + "hvac_mode_dp": "HVAC Mode DP (optional)", + "hvac_mode_set": "HVAC Mode Set (optional)", + "hvac_action_dp": "HVAC Current Action DP (optional)", + "hvac_action_set": "HVAC Current Action Set (optional)", + "preset_dp": "Presets DP (optional)", + "preset_set": "Presets Set (optional)", + "eco_dp": "Eco DP (optional)", + "eco_value": "Eco value (optional)", + "heuristic_action": "Enable heuristic action (optional)", + "dps_default_value": "Default value when un-initialised (optional)", + "restore_on_reconnect": "Restore the last set value in HomeAssistant after a lost connection", + "min_value": "Minimum Value", + "max_value": "Maximum Value", + "step_size": "Minimum increment between numbers" + } + }, + "yaml_import": { + "title": "Not Supported", + "description": "Options cannot be edited when configured via YAML." + } + } + }, + "title": "LocalTuya" +} \ No newline at end of file diff --git a/custom_components/localtuya/translations/en.json b/custom_components/localtuya/translations/en.json new file mode 100644 index 00000000..8fdbb609 --- /dev/null +++ b/custom_components/localtuya/translations/en.json @@ -0,0 +1,238 @@ +{ + "config": { + "abort": { + "already_configured": "Device has already been configured.", + "device_updated": "Device configuration has been updated!" + }, + "error": { + "authentication_failed": "Failed to authenticate.\n{msg}", + "cannot_connect": "Cannot connect to device. Verify that address is correct and try again.", + "device_list_failed": "Failed to retrieve device list.\n{msg}", + "invalid_auth": "Failed to authenticate with device. Verify that device id and local key are correct.", + "unknown": "An unknown error occurred. See log for details.", + "entity_already_configured": "Entity with this ID has already been configured.", + "address_in_use": "Address used for discovery is already in use. Make sure no other application is using it (TCP port 6668).", + "discovery_failed": "Something failed when discovering devices. See log for details.", + "empty_dps": "Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists." + }, + "step": { + "user": { + "title": "Cloud API account configuration", + "description": "Input the credentials for Tuya Cloud API.", + "data": { + "region": "API server region", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID", + "user_name": "Username", + "no_cloud": "Do not configure a Cloud API account" + } + } + } + }, + "options": { + "abort": { + "already_configured": "Device has already been configured.", + "device_success": "Device {dev_name} successfully {action}.", + "no_entities": "Cannot remove all entities from a device.\nIf you want to delete a device, enter it in the Devices menu, click the 3 dots in the 'Device info' frame, and press the Delete button." + }, + "error": { + "authentication_failed": "Failed to authenticate.\n{msg}", + "cannot_connect": "Cannot connect to device. Verify that address is correct and try again.", + "device_list_failed": "Failed to retrieve device list.\n{msg}", + "invalid_auth": "Failed to authenticate with device. Verify that device id and local key are correct.", + "unknown": "An unknown error occurred. See log for details.", + "entity_already_configured": "Entity with this ID has already been configured.", + "address_in_use": "Address used for discovery is already in use. Make sure no other application is using it (TCP port 6668).", + "discovery_failed": "Something failed when discovering devices. See log for details.", + "empty_dps": "Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists." + }, + "step": { + "yaml_import": { + "title": "Not Supported", + "description": "Options cannot be edited when configured via YAML." + }, + "init": { + "title": "LocalTuya Configuration", + "description": "Please select the desired action.", + "data": { + "add_device": "Add a new device", + "edit_device": "Edit a device", + "setup_cloud": "Reconfigure Cloud API account" + } + }, + "add_device": { + "title": "Add a new device", + "description": "Pick one of the automatically discovered devices or `...` to manually to add a device.", + "data": { + "selected_device": "Discovered Devices" + } + }, + "edit_device": { + "title": "Edit a new device", + "description": "Pick the configured device you wish to edit.", + "data": { + "selected_device": "Configured Devices", + "max_temperature_const": "Max Temperature Constant (optional)", + "min_temperature_const": "Min Temperature Constant (optional)", + "hvac_fan_mode_dp": "HVAC Fan Mode DP (optional)", + "hvac_fan_mode_set": "HVAC Fan Mode Set (optional)", + "hvac_swing_mode_dp": "HVAC Swing Mode DP (optional)", + "hvac_swing_mode_set": "HVAC Swing Mode Set (optional)" + } + }, + "cloud_setup": { + "title": "Cloud API account configuration", + "description": "Input the credentials for Tuya Cloud API.", + "data": { + "region": "API server region", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID", + "user_name": "Username", + "no_cloud": "Do not configure Cloud API account" + } + }, + "configure_device": { + "title": "Configure Tuya device", + "description": "Fill in the device details{for_device}.", + "data": { + "friendly_name": "Name", + "host": "Host", + "device_id": "Device ID", + "local_key": "Local key", + "protocol_version": "Protocol Version", + "enable_debug": "Enable debugging for this device (debug must be enabled also in configuration.yaml)", + "scan_interval": "Scan interval (seconds, only when not updating automatically)", + "entities": "Entities (uncheck an entity to remove it)", + "add_entities": "Add more entities in 'edit device' mode", + "manual_dps_strings": "Manual DPS to add (separated by commas ',') - used when detection is not working (optional)", + "reset_dpids": "DPIDs to send in RESET command (separated by commas ',')- Used when device does not respond to status requests after turning on (optional)" + } + }, + "pick_entity_type": { + "title": "Entity type selection", + "description": "Please pick the type of entity you want to add.", + "data": { + "platform_to_add": "Platform", + "no_additional_entities": "Do not add any more entities" + } + }, + "configure_entity": { + "title": "Configure entity", + "description": "Please fill out the details for {entity} with type `{platform}`. All settings except for `ID` can be changed from the Options page later.", + "data": { + "id": "ID", + "friendly_name": "Friendly name", + "current": "Current", + "current_consumption": "Current Consumption", + "voltage": "Voltage", + "commands_set": "Open_Close_Stop Commands Set", + "positioning_mode": "Positioning mode", + "current_position_dp": "Current Position (for *position* mode only)", + "set_position_dp": "Set Position (for *position* mode only)", + "position_inverted": "Invert 0-100 position (for *position* mode only)", + "span_time": "Full opening time, in secs. (for *timed* mode only)", + "unit_of_measurement": "Unit of Measurement", + "device_class": "Device Class", + "scaling": "Scaling Factor", + "state_on": "On Value", + "state_off": "Off Value", + "powergo_dp": "Power DP (Usually 25 or 2)", + "idle_status_value": "Idle Status (comma-separated)", + "returning_status_value": "Returning Status", + "docked_status_value": "Docked Status (comma-separated)", + "fault_dp": "Fault DP (Usually 11)", + "battery_dp": "Battery status DP (Usually 14)", + "mode_dp": "Mode DP (Usually 27)", + "modes": "Modes list", + "return_mode": "Return home mode", + "fan_speed_dp": "Fan speeds DP (Usually 30)", + "fan_speeds": "Fan speeds list (comma-separated)", + "clean_time_dp": "Clean Time DP (Usually 33)", + "clean_area_dp": "Clean Area DP (Usually 32)", + "clean_record_dp": "Clean Record DP (Usually 34)", + "locate_dp": "Locate DP (Usually 31)", + "paused_state": "Pause state (pause, paused, etc)", + "stop_status": "Stop status", + "brightness": "Brightness (only for white color)", + "brightness_lower": "Brightness Lower Value", + "brightness_upper": "Brightness Upper Value", + "color_temp": "Color Temperature", + "color_temp_reverse": "Color Temperature Reverse", + "color": "Color", + "color_mode": "Color Mode", + "color_temp_min_kelvin": "Minimum Color Temperature in K", + "color_temp_max_kelvin": "Maximum Color Temperature in K", + "music_mode": "Music mode available", + "scene": "Scene", + "select_options": "Valid entries, separate entries by a ;", + "select_options_friendly": "User Friendly options, separate entries by a ;", + "fan_speed_control": "Fan Speed Control dps", + "fan_oscillating_control": "Fan Oscillating Control dps", + "fan_speed_min": "minimum fan speed integer", + "fan_speed_max": "maximum fan speed integer", + "fan_speed_ordered_list": "Fan speed modes list (overrides speed min/max)", + "fan_direction": "fan direction dps", + "fan_direction_forward": "forward dps string", + "fan_direction_reverse": "reverse dps string", + "fan_dps_type": "DP value type", + "current_temperature_dp": "Current Temperature", + "target_temperature_dp": "Target Temperature", + "temperature_step": "Temperature Step (optional)", + "max_temperature_dp": "Max Temperature DP (optional)", + "min_temperature_dp": "Min Temperature DP (optional)", + "max_temperature_const": "Max Temperature Constant (optional)", + "min_temperature_const": "Min Temperature Constant (optional)", + "precision": "Precision (optional, for DPs values)", + "target_precision": "Target Precision (optional, for DPs values)", + "temperature_unit": "Temperature Unit (optional)", + "hvac_mode_dp": "HVAC Mode DP (optional)", + "hvac_mode_set": "HVAC Mode Set (optional)", + "hvac_fan_mode_dp": "HVAC Fan Mode DP (optional)", + "hvac_fan_mode_set": "HVAC Fan Mode Set (optional)", + "hvac_swing_mode_dp": "HVAC Swing Mode DP (optional)", + "hvac_swing_mode_set": "HVAC Swing Mode Set (optional)", + "hvac_action_dp": "HVAC Current Action DP (optional)", + "hvac_action_set": "HVAC Current Action Set (optional)", + "preset_dp": "Presets DP (optional)", + "preset_set": "Presets Set (optional)", + "eco_dp": "Eco DP (optional)", + "eco_value": "Eco value (optional)", + "heuristic_action": "Enable heuristic action (optional)", + "dps_default_value": "Default value when un-initialised (optional)", + "restore_on_reconnect": "Restore the last set value in HomeAssistant after a lost connection", + "min_value": "Minimum Value", + "max_value": "Maximum Value", + "step_size": "Minimum increment between numbers", + "is_passive_entity": "Passive entity - requires integration to send initialisation value" + } + } + } + }, + "services": { + "reload": { + "name": "Reload", + "description": "Reload localtuya and reconnect to all devices." + }, + "set_dp": { + "name": "Set datapoint", + "description": "Change the value of a datapoint (DP)", + "fields": { + "device_id": { + "name": "Device ID", + "description": "Device ID of device to change datapoint value for" + }, + "dp": { + "name": "DP", + "description": "Datapoint index" + }, + "value": { + "name": "Value", + "description": "New value to set" + } + } + } + }, + "title": "LocalTuya" +} \ No newline at end of file diff --git a/custom_components/localtuya/translations/it.json b/custom_components/localtuya/translations/it.json new file mode 100644 index 00000000..264bb97f --- /dev/null +++ b/custom_components/localtuya/translations/it.json @@ -0,0 +1,216 @@ +{ + "config": { + "abort": { + "already_configured": "Il dispositivo è già stato configurato.", + "device_updated": "La configurazione del dispositivo è stata aggiornata." + }, + "error": { + "authentication_failed": "Autenticazione fallita. Errore:\n{msg}", + "cannot_connect": "Impossibile connettersi al dispositivo. Verifica che l'indirizzo sia corretto e riprova.", + "device_list_failed": "Impossibile recuperare l'elenco dei dispositivi.\n{msg}", + "invalid_auth": "Impossibile autenticarsi con il dispositivo. Verificare che device_id e local_key siano corretti.", + "unknown": "Si è verificato un errore sconosciuto. Vedere registro per i dettagli.", + "entity_already_configured": "L'entity con questo ID è già stata configurata.", + "address_in_use": "L'indirizzo utilizzato per il discovery è già in uso. Assicurarsi che nessun'altra applicazione lo stia utilizzando (porta TCP 6668).", + "discovery_failed": "Qualcosa è fallito nella discovery dei dispositivi. Vedi registro per i dettagli.", + "empty_dps": "La connessione al dispositivo è riuscita ma non sono stati trovati i datapoint, riprova. Crea un nuovo Issue e includi i log di debug se il problema persiste." + }, + "step": { + "user": { + "title": "Configurazione dell'account Cloud API", + "description": "Inserisci le credenziali per l'account Cloud API Tuya.", + "data": { + "region": "Regione del server API", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID", + "user_name": "Username", + "no_cloud": "Non configurare un account Cloud API" + } + } + } + }, + "options": { + "abort": { + "already_configured": "Il dispositivo è già stato configurato.", + "device_success": "Dispositivo {dev_name} {action} con successo.", + "no_entities": "Non si possono rimuovere tutte le entities da un device.\nPer rimuovere un device, entrarci nel menu Devices, premere sui 3 punti nel riquadro 'Device info', e premere il pulsante Delete." + }, + "error": { + "authentication_failed": "Autenticazione fallita. Errore:\n{msg}", + "cannot_connect": "Impossibile connettersi al dispositivo. Verifica che l'indirizzo sia corretto e riprova.", + "device_list_failed": "Impossibile recuperare l'elenco dei dispositivi.\n{msg}", + "invalid_auth": "Impossibile autenticarsi con il dispositivo. Verificare che device_id e local_key siano corretti.", + "unknown": "Si è verificato un errore sconosciuto. Vedere registro per i dettagli.", + "entity_already_configured": "L'entity con questo ID è già stata configurata.", + "address_in_use": "L'indirizzo utilizzato per il discovery è già in uso. Assicurarsi che nessun'altra applicazione lo stia utilizzando (porta TCP 6668).", + "discovery_failed": "Qualcosa è fallito nella discovery dei dispositivi. Vedi registro per i dettagli.", + "empty_dps": "La connessione al dispositivo è riuscita ma non sono stati trovati i datapoint, riprova. Crea un nuovo Issue e includi i log di debug se il problema persiste." + }, + "step": { + "yaml_import": { + "title": "Non supportato", + "description": "Le impostazioni non possono essere configurate tramite file YAML." + }, + "init": { + "title": "Configurazione LocalTuya", + "description": "Seleziona l'azione desiderata.", + "data": { + "add_device": "Aggiungi un nuovo dispositivo", + "edit_device": "Modifica un dispositivo", + "setup_cloud": "Riconfigurare l'account Cloud API" + } + }, + "add_device": { + "title": "Aggiungi un nuovo dispositivo", + "description": "Scegli uno dei dispositivi trovati automaticamente o `...` per aggiungere manualmente un dispositivo.", + "data": { + "selected_device": "Dispositivi trovati" + } + }, + "edit_device": { + "title": "Modifica un dispositivo", + "description": "Scegli il dispositivo configurato che si desidera modificare.", + "data": { + "selected_device": "Dispositivi configurati" + } + }, + "cloud_setup": { + "title": "Configurazione dell'account Cloud API", + "description": "Inserisci le credenziali per l'account Cloud API Tuya.", + "data": { + "region": "Regione del server API", + "client_id": "Client ID", + "client_secret": "Secret", + "user_id": "User ID", + "user_name": "Username", + "no_cloud": "Non configurare l'account Cloud API" + } + }, + "configure_device": { + "title": "Configura il dispositivo", + "description": "Compila i dettagli del dispositivo {for_device}.", + "data": { + "friendly_name": "Nome", + "host": "Host", + "device_id": "ID del dispositivo", + "local_key": "Chiave locale", + "protocol_version": "Versione del protocollo", + "enable_debug": "Abilita il debugging per questo device (il debug va abilitato anche in configuration.yaml)", + "scan_interval": "Intervallo di scansione (secondi, solo quando non si aggiorna automaticamente)", + "entities": "Entities (deseleziona un'entity per rimuoverla)" + } + }, + "pick_entity_type": { + "title": "Selezione del tipo di entity", + "description": "Scegli il tipo di entity che desideri aggiungere.", + "data": { + "platform_to_add": "piattaforma", + "no_additional_entities": "Non aggiungere altre entity" + } + }, + "configure_entity": { + "title": "Configurare entity", + "description": "Compila i dettagli per {entity} con tipo `{platform}`.Tutte le impostazioni ad eccezione di `id` possono essere modificate dalla pagina delle opzioni in seguito.", + "data": { + "id": "ID", + "friendly_name": "Nome amichevole", + "current": "Corrente", + "current_consumption": "Potenza", + "voltage": "Tensione", + "commands_set": "Set di comandi Aperto_Chiuso_Stop", + "positioning_mode": "Modalità di posizionamento", + "current_position_dp": "Posizione attuale (solo per la modalità *posizione*)", + "set_position_dp": "Imposta posizione (solo per modalità *posizione*)", + "position_inverted": "Inverti posizione 0-100 (solo per modalità *posizione*)", + "span_time": "Tempo di apertura totale, in sec. (solo per modalità *a tempo*)", + "unit_of_measurement": "Unità di misura", + "device_class": "Classe del dispositivo", + "scaling": "Fattore di scala", + "state_on": "Valore di ON", + "state_off": "Valore di OFF", + "powergo_dp": "Potenza DP (di solito 25 o 2)", + "idle_status_value": "Stato di inattività (separato da virgole)", + "returning_status_value": "Stato di ritorno alla base", + "docked_status_value": "Stato di tornato alla base (separato da virgole)", + "fault_dp": "DP di guasto (di solito 11)", + "battery_dp": "DP di stato batteria (di solito 14)", + "mode_dp": "DP di modalità (di solito 27)", + "modes": "Elenco delle modalità", + "return_mode": "Ritorno in modalità home", + "fan_speed_dp": "DP di velocità del ventilatore (di solito 30)", + "fan_speeds": "DP di elenco delle velocità del ventilatore (separato da virgola)", + "clean_time_dp": "DP di tempo di pulizia (di solito 33)", + "clean_area_dp": "DP di area pulita (di solito 32)", + "clean_record_dp": "DP di record delle pulizie (di solito 34)", + "locate_dp": "DP di individuazione (di solito 31)", + "paused_state": "Stato di pausa (pausa, pausa, ecc.)", + "stop_status": "Stato di stop", + "brightness": "Luminosità (solo per il colore bianco)", + "brightness_lower": "Limite inferiore per la luminosità", + "brightness_upper": "Limite superiore per la luminosità", + "color_temp": "Temperatura di colore", + "color_temp_reverse": "Temperatura di colore invertita", + "color": "Colore", + "color_mode": "Modalità colore", + "color_temp_min_kelvin": "Minima temperatura di colore in K", + "color_temp_max_kelvin": "Massima temperatura di colore in k", + "music_mode": "Modalità musicale disponibile", + "scene": "Scena", + "select_options": "Opzioni valide, voci separate da una vigola (;)", + "select_options_friendly": "Opzioni intuitive, voci separate da una virgola", + "fan_speed_control": "DP di controllo di velocità del ventilatore", + "fan_oscillating_control": "DP di controllo dell'oscillazione del ventilatore", + "fan_speed_min": "Velocità del ventilatore minima", + "fan_speed_max": "Velocità del ventilatore massima", + "fan_speed_ordered_list": "Elenco delle modalità di velocità del ventilatore (sovrascrive velocità min/max)", + "fan_direction":"DP di direzione del ventilatore", + "fan_direction_forward": "Stringa del DP per avanti", + "fan_direction_reverse": "Stringa del DP per indietro", + "current_temperature_dp": "Temperatura attuale", + "target_temperature_dp": "Temperatura target", + "temperature_step": "Intervalli di temperatura (facoltativo)", + "max_temperature_dp": "Temperatura massima (opzionale)", + "min_temperature_dp": "Temperatura minima (opzionale)", + "precision": "Precisione (opzionale, per valori DP)", + "target_precision": "Precisione del target (opzionale, per valori DP)", + "temperature_unit": "Unità di temperatura (opzionale)", + "hvac_mode_dp": "Modalità HVAC attuale (opzionale)", + "hvac_mode_set": "Impostazione modalità HVAC (opzionale)", + "hvac_action_dp": "Azione HVAC attuale (opzionale)", + "hvac_action_set": "Impostazione azione HVAC (opzionale)", + "preset_dp": "Preset DP (opzionale)", + "preset_set": "Set di preset (opzionale)", + "eco_dp": "DP per Eco (opzionale)", + "eco_value": "Valore Eco (opzionale)", + "heuristic_action": "Abilita azione euristica (opzionale)" + } + } + } + }, + "services": { + "reload": { + "name": "Reload", + "description": "Reload localtuya and reconnect to all devices." + }, + "set_dp": { + "name": "Set datapoint", + "description": "Change the value of a datapoint (DP)", + "fields": { + "device_id": { + "name": "Device ID", + "description": "Device ID of device to change datapoint value for" + }, + "dp": { + "name": "DP", + "description": "Datapoint index" + }, + "value": { + "name": "Value", + "description": "New value to set" + } + } + } + }, + "title": "LocalTuya" +} diff --git a/custom_components/localtuya/translations/pt-BR.json b/custom_components/localtuya/translations/pt-BR.json new file mode 100644 index 00000000..74884ee6 --- /dev/null +++ b/custom_components/localtuya/translations/pt-BR.json @@ -0,0 +1,216 @@ +{ + "config": { + "abort": { + "already_configured": "O dispositivo já foi configurado.", + "device_updated": "A configuração do dispositivo foi atualizada!" + }, + "error": { + "authentication_failed": "Falha ao autenticar.\n{msg}", + "cannot_connect": "Não é possível se conectar ao dispositivo. Verifique se o endereço está correto e tente novamente", + "device_list_failed": "Falha ao recuperar a lista de dispositivos.\n{msg}", + "invalid_auth": "Falha ao autenticar com o dispositivo. Verifique se o ID do dispositivo e a chave local estão corretos.", + "unknown": "Ocorreu um erro desconhecido. Consulte o registro para obter detalhes.", + "entity_already_configured": "A entidade com este ID já foi configurada.", + "address_in_use": "AddresO endereço usado para descoberta já está em uso. Certifique-se de que nenhum outro aplicativo o esteja usando (porta TCP 6668).s used for discovery is already in use. Make sure no other application is using it (TCP port 6668).", + "discovery_failed": "Algo falhou ao descobrir dispositivos. Consulte o registro para obter detalhes.", + "empty_dps": "A conexão com o dispositivo foi bem-sucedida, mas nenhum ponto de dados foi encontrado. Tente novamente. Crie um novo issue e inclua os logs de depuração se o problema persistir." + }, + "step": { + "user": { + "title": "Configuração da conta da API do Cloud", + "description": "Insira as credenciais para a API Tuya Cloud.", + "data": { + "region": "Região do servidor de API", + "client_id": "ID do cliente", + "client_secret": "Secret", + "user_id": "ID de usuário", + "user_name": "Nome de usuário", + "no_cloud": "Não configure uma conta de API da Cloud" + } + } + } + }, + "options": { + "abort": { + "already_configured": "O dispositivo já foi configurado.", + "device_success": "Dispositivo {dev_name} {action} com sucesso.", + "no_entities": "Não é possível remover todas as entidades de um dispositivo.\nSe você deseja excluir um dispositivo, insira-o no menu Dispositivos, clique nos 3 pontos no quadro 'Informações do dispositivo' e pressione o botão Excluir." + }, + "error": { + "authentication_failed": "Falha ao autenticar.\n{msg}", + "cannot_connect": "Não é possível se conectar ao dispositivo. Verifique se o endereço está correto e tente novamente", + "device_list_failed": "Falha ao recuperar a lista de dispositivos.\n{msg}", + "invalid_auth": "Falha ao autenticar com o dispositivo. Verifique se o ID do dispositivo e a chave local estão corretos.", + "unknown": "Ocorreu um erro desconhecido. Consulte o registro para obter detalhes.", + "entity_already_configured": "A entidade com este ID já foi configurada.", + "address_in_use": "O endereço usado para descoberta já está em uso. Certifique-se de que nenhum outro aplicativo o esteja usando (porta TCP 6668).", + "discovery_failed": "Algo falhou ao descobrir dispositivos. Consulte o registro para obter detalhes.", + "empty_dps": "A conexão com o dispositivo foi bem-sucedida, mas nenhum ponto de dados foi encontrado. Tente novamente. Crie um novo issue e inclua os logs de depuração se o problema persistir." + }, + "step": { + "yaml_import": { + "title": "Não suportado", + "description": "As opções não podem ser editadas quando configuradas via YAML." + }, + "init": { + "title": "Configuração LocalTuya", + "description": "Selecione a ação desejada.", + "data": { + "add_device": "Adicionar um novo dispositivo", + "edit_device": "Editar um dispositivo", + "setup_cloud": "Reconfigurar a conta da API da Cloud" + } + }, + "add_device": { + "title": "Adicionar um novo dispositivo", + "description": "Escolha um dos dispositivos descobertos automaticamente ou `...` para adicionar um dispositivo manualmente.", + "data": { + "selected_device": "Dispositivos descobertos" + } + }, + "edit_device": { + "title": "Editar um novo dispositivo", + "description": "Escolha o dispositivo configurado que você deseja editar.", + "data": { + "selected_device": "Dispositivos configurados" + } + }, + "cloud_setup": { + "title": "Configuração da conta da API da Cloud", + "description": "Insira as credenciais para a API Tuya Cloud.", + "data": { + "region": "Região do servidor de API", + "client_id": "ID do Cliente", + "client_secret": "Secret", + "user_id": "ID do usuário", + "user_name": "Nome de usuário", + "no_cloud": "Não configure a conta da API da Cloud" + } + }, + "configure_device": { + "title": "Configurar dispositivo Tuya", + "description": "Preencha os detalhes do dispositivo {for_device}.", + "data": { + "friendly_name": "Nome", + "host": "Host", + "device_id": "ID do dispositivo", + "local_key": "Local key", + "protocol_version": "Versão do protocolo", + "enable_debug": "Ative a depuração para este dispositivo (a depuração também deve ser ativada em configuration.yaml)", + "scan_interval": "Intervalo de escaneamento (segundos, somente quando não estiver atualizando automaticamente)", + "entities": "Entidades (desmarque uma entidade para removê-la)" + } + }, + "pick_entity_type": { + "title": "Seleção do tipo de entidade", + "description": "Escolha o tipo de entidade que deseja adicionar.", + "data": { + "platform_to_add": "Plataforma", + "no_additional_entities": "Não adicione mais entidades" + } + }, + "configure_entity": { + "title": "Configurar entidade", + "description": "Por favor, preencha os detalhes de {entity} com o tipo `{platform}`. Todas as configurações, exceto `ID`, podem ser alteradas na página Opções posteriormente.", + "data": { + "id": "ID", + "friendly_name": "Nome fantasia", + "current": "Atual", + "current_consumption": "Consumo atual", + "voltage": "Voltagem", + "commands_set": "Conjunto de comandos Abrir_Fechar_Parar", + "positioning_mode": "Modo de posicionamento", + "current_position_dp": "Posição atual (somente para o modo *posição*)", + "set_position_dp": "Definir posição (somente para o modo *posição*)", + "position_inverted": "Inverter 0-100 posição (somente para o modo *posição*)", + "span_time": "Tempo de abertura completo, em segundos. (somente para o modo *temporizado*)", + "unit_of_measurement": "Unidade de medida", + "device_class": "Classe do dispositivo", + "scaling": "Fator de escala", + "state_on": "Valor ligado", + "state_off": "Valor desligado", + "powergo_dp": "Potência DP (Geralmente 25 ou 2)", + "idle_status_value": "Status ocioso (separado por vírgula)", + "returning_status_value": "Status de retorno", + "docked_status_value": "Status encaixado (separado por vírgula)", + "fault_dp": "Falha DP (Geralmente 11)", + "battery_dp": "Status da bateria DP (normalmente 14)", + "mode_dp": "Modo DP (Geralmente 27)", + "modes": "Lista de modos", + "return_mode": "Modo de retorno para casa", + "fan_speed_dp": "Velocidades do ventilador DP (normalmente 30)", + "fan_speeds": "Lista de velocidades do ventilador (separadas por vírgulas)", + "clean_time_dp": "Tempo Limpo DP (Geralmente 33)", + "clean_area_dp": "Área Limpa DP (Geralmente 32)", + "clean_record_dp": "Limpar Registro DP (Geralmente 34)", + "locate_dp": "Localize DP (Geralmente 31)", + "paused_state": "Estado de pausa (pausa, pausado, etc)", + "stop_status": "Status de parada", + "brightness": "Brilho (somente para cor branca)", + "brightness_lower": "Valor mais baixo de brilho", + "brightness_upper": "Valor superior de brilho", + "color_temp": "Temperatura da cor", + "color_temp_reverse": "Temperatura da cor reversa", + "color": "Cor", + "color_mode": "Modo de cor", + "color_temp_min_kelvin": "Temperatura de cor mínima em K", + "color_temp_max_kelvin": "Temperatura máxima de cor em K", + "music_mode": "Modo de música disponível", + "scene": "Cena", + "select_options": "Entradas válidas, entradas separadas por um ;", + "select_options_friendly": "Opções fantasia ​​ao usuário, entradas separadas por um ;", + "fan_speed_control": "Dps de controle de velocidade do ventilador", + "fan_oscillating_control": "Dps de controle oscilante do ventilador", + "fan_speed_min": "Velocidade mínima do ventilador inteiro", + "fan_speed_max": "Velocidade máxima do ventilador inteiro", + "fan_speed_ordered_list": "Lista de modos de velocidade do ventilador (substitui a velocidade min/max)", + "fan_direction":"Direção do ventilador dps", + "fan_direction_forward": "Seqüência de dps para frente", + "fan_direction_reverse": "String dps reversa", + "current_temperature_dp": "Temperatura atual", + "target_temperature_dp": "Temperatura alvo", + "temperature_step": "Etapa de temperatura (opcional)", + "max_temperature_dp": "Temperatura máxima (opcional)", + "min_temperature_dp": "Temperatura mínima (opcional)", + "precision": "Precisão (opcional, para valores de DPs)", + "target_precision": "Precisão do alvo (opcional, para valores de DPs)", + "temperature_unit": "Unidade de Temperatura (opcional)", + "hvac_mode_dp": "Modo HVAC DP (opcional)", + "hvac_mode_set": "Conjunto de modo HVAC (opcional)", + "hvac_action_dp": "Ação atual de HVAC DP (opcional)", + "hvac_action_set": "Conjunto de ação atual HVAC (opcional)", + "preset_dp": "Predefinições DP (opcional)", + "preset_set": "Conjunto de predefinições (opcional)", + "eco_dp": "Eco DP (opcional)", + "eco_value": "Valor eco (opcional)", + "heuristic_action": "Ativar ação heurística (opcional)" + } + } + } + }, + "services": { + "reload": { + "name": "Reload", + "description": "Reload localtuya and reconnect to all devices." + }, + "set_dp": { + "name": "Set datapoint", + "description": "Change the value of a datapoint (DP)", + "fields": { + "device_id": { + "name": "Device ID", + "description": "Device ID of device to change datapoint value for" + }, + "dp": { + "name": "DP", + "description": "Datapoint index" + }, + "value": { + "name": "Value", + "description": "New value to set" + } + } + } + }, + "title": "LocalTuya" +} diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index fe1d9013..8be6ca06 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -4,10 +4,10 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 119.4, + "voltage": 119.1, "countdown_to_turn_on": 0, "ac_frequency": 60, - "power_factor": 0.11, + "power_factor": 0.14, "update": { "state": "idle", "installed_version": 268513381, @@ -22,15 +22,15 @@ }, "0xffffb40e0607af27": { "state": "ON", - "voltage": 118.2, + "voltage": 118.5, "ac_frequency": 60, "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "power": 237.3, - "current": 2.04, - "energy": 33.19, - "power_factor": 0.98, + "power": 1111.8, + "current": 10.99, + "energy": 33.3, + "power_factor": 0.94, "update": { "state": "idle", "installed_version": 268513381, @@ -45,10 +45,10 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 119.2, + "voltage": 118.7, "countdown_to_turn_on": 0, "energy": 67.07, - "power_factor": 0.9, + "power_factor": 0.2, "ac_frequency": 60, "update": { "state": "idle", @@ -58,8 +58,8 @@ "latest_release_notes": null }, "linkquality": 142, - "power": 83.1, - "current": 0.82, + "power": 0.2, + "current": 0.01, "power_on_behavior": "on" }, "0xb40e060fffe031e3": { @@ -74,13 +74,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 119.1, + "voltage": 118.6, "state": "ON", "ac_frequency": 60, - "energy": 135.6, - "power": 4, - "current": 0.07, - "power_factor": 0.65, + "energy": 135.61, + "power": 100.9, + "current": 0.9, + "power_factor": 0.95, "update": { "state": "idle", "installed_version": 268513381, @@ -95,13 +95,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 118.6, - "energy": 64.8, + "voltage": 115.1, + "energy": 64.82, "state": "ON", - "power": 55.7, - "current": 0.64, + "power": 55, + "current": 0.66, "ac_frequency": 60, - "power_factor": 0.8, + "power_factor": 0.79, "update": { "state": "idle", "installed_version": 268513381, @@ -114,7 +114,7 @@ }, "0xffffb40e060895b3": { "state": "ON", - "voltage": 119.6, + "voltage": 119, "ac_frequency": 60, "energy": 8.94, "current": 0.01, @@ -136,7 +136,7 @@ "0xffffb40e0608864e": { "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 120.3, + "voltage": 120.2, "energy": 20.23, "countdown_to_turn_on": 0, "state": "ON", @@ -172,7 +172,7 @@ "0xffffb40e060893d8": { "state": "ON", "led_brightness": 100, - "voltage": 119.6, + "voltage": 119.1, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, "energy": 3.77, @@ -192,7 +192,7 @@ }, "0xa4c1380d0679ffff": { "battery": 100, - "temperature": 27.9, + "temperature": 28.1, "temperature_units": "celsius", "temperature_calibration": 0, "update": {