From c66b25229c6d3533ca6d177592397f4c235a5921 Mon Sep 17 00:00:00 2001 From: dougiteixeira <31328123+dougiteixeira@users.noreply.github.com> Date: Mon, 24 Jan 2022 10:38:45 -0300 Subject: [PATCH] Fix error in Tuya diagnostics (#64808) Co-authored-by: Franck Nijhof --- homeassistant/components/tuya/diagnostics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tuya/diagnostics.py b/homeassistant/components/tuya/diagnostics.py index 9a37478cfbd..f0e5ed2852f 100644 --- a/homeassistant/components/tuya/diagnostics.py +++ b/homeassistant/components/tuya/diagnostics.py @@ -84,8 +84,8 @@ def _async_device_as_dict(hass: HomeAssistant, device: TuyaDevice) -> dict[str, # Base device information, without sensitive information. data = { - "name": device.model, - "model": device.model, + "name": device.name, + "model": device.model if hasattr(device, "model") else None, "category": device.category, "product_id": device.product_id, "product_name": device.product_name,