Minor Tuya Fix (#35497)

This commit is contained in:
ollo69 authored and GitHub committed 2020-05-11 08:45:12 -04:00
1 parent c401949af8
commit f4e4ea10e5
9 files changed
+22 -23

No files matched your search

+4 -3
View File
@@ -207,7 +207,7 @@ class TuyaDevice(Entity):
def __init__(self, tuya, platform):
"""Init Tuya devices."""
self._tuya = tuya
self._platform = platform
self._tuya_platform = platform
async def async_added_to_hass(self):
"""Call when entity is added to hass."""
@@ -241,7 +241,9 @@ class TuyaDevice(Entity):
"""Return a device description for device registry."""
_device_info = {
"identifiers": {(DOMAIN, f"{self.unique_id}")},
"manufacturer": TUYA_PLATFORMS.get(self._platform, self._platform),
"manufacturer": TUYA_PLATFORMS.get(
self._tuya_platform, self._tuya_platform
),
"name": self.name,
"model": self._tuya.object_type(),
}
@@ -251,7 +253,6 @@ class TuyaDevice(Entity):
"""Refresh Tuya device data."""
self._tuya.update()
@callback
async def _delete_callback(self, dev_id):
"""Remove this entity."""
if dev_id == self.object_id: