Fix error in Tuya diagnostics (#64808)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
pull/64845/head
dougiteixeira 2022-01-24 10:38:45 -03:00 committed by GitHub
parent 7c1eabadfa
commit c66b25229c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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,