diff --git a/custom_components/localtuya/config_flow.py b/custom_components/localtuya/config_flow.py index 8f37be92f..0099901e5 100644 --- a/custom_components/localtuya/config_flow.py +++ b/custom_components/localtuya/config_flow.py @@ -83,6 +83,7 @@ } ) + DEVICE_SCHEMA = vol.Schema( { vol.Required(CONF_FRIENDLY_NAME): cv.string, diff --git a/custom_components/localtuya/pytuya/__init__.py b/custom_components/localtuya/pytuya/__init__.py index df34c9372..ad546c4cc 100644 --- a/custom_components/localtuya/pytuya/__init__.py +++ b/custom_components/localtuya/pytuya/__init__.py @@ -996,7 +996,6 @@ async def _negotiate_session_key(self): ) # self.debug("session local nonce: %r remote nonce: %r", self.local_nonce, self.remote_nonce) - rkey_hmac = hmac.new(self.local_key, self.remote_nonce, sha256).digest() await self.exchange_quick(MessagePayload(SESS_KEY_NEG_FINISH, rkey_hmac), None) diff --git a/custom_components/localtuya/translations/en.json b/custom_components/localtuya/translations/en.json index 157fdf926..947141cb5 100644 --- a/custom_components/localtuya/translations/en.json +++ b/custom_components/localtuya/translations/en.json @@ -33,7 +33,8 @@ "options": { "abort": { "already_configured": "Device has already been configured.", - "device_success": "Device {dev_name} successfully {action}." + "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}", diff --git a/custom_components/localtuya/translations/it.json b/custom_components/localtuya/translations/it.json index 1cbd4c05e..9b05309e2 100644 --- a/custom_components/localtuya/translations/it.json +++ b/custom_components/localtuya/translations/it.json @@ -33,7 +33,8 @@ "options": { "abort": { "already_configured": "Il dispositivo è già stato configurato.", - "device_success": "Dispositivo {dev_name} {action} con successo." + "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}", diff --git a/custom_components/localtuya/translations/pt-BR.json b/custom_components/localtuya/translations/pt-BR.json index 26f01acd9..ca5629c13 100644 --- a/custom_components/localtuya/translations/pt-BR.json +++ b/custom_components/localtuya/translations/pt-BR.json @@ -33,7 +33,8 @@ "options": { "abort": { "already_configured": "O dispositivo já foi configurado.", - "device_success": "Dispositivo {dev_name} {action} com sucesso." + "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}",