LocaltuyaCover now inherits from LocalTuyaEntity

This commit is contained in:
rospogrigio
2020-09-18 12:50:04 +02:00
committed by rospogrigio
parent 7afd19d197
commit 1a9f7382fc
3 changed files with 47 additions and 98 deletions

View File

@@ -112,6 +112,19 @@ class LocalTuyaEntity(Entity):
self._dps_id = dps_id
self._status = None
@property
def device_info(self):
return {
"identifiers": {
# Serial numbers are unique identifiers within a specific domain
("LocalTuya", f"local_{self._device.unique_id}")
},
"name": self._device._friendly_name,
"manufacturer": "Unknown",
"model": "Tuya generic",
"sw_version": "3.3",
}
@property
def name(self):
"""Get name of Tuya entity."""