LocaltuyaCover now inherits from LocalTuyaEntity
This commit is contained in:
@@ -170,6 +170,7 @@ class TuyaCache:
|
||||
return
|
||||
|
||||
# raise ConnectionError("Failed to set status.")
|
||||
self.update()
|
||||
|
||||
def status(self):
|
||||
"""Get state of Tuya switch and cache the results."""
|
||||
@@ -204,19 +205,6 @@ class LocaltuyaSwitch(LocalTuyaEntity, SwitchEntity):
|
||||
)
|
||||
)
|
||||
|
||||
@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": "Tuya generic",
|
||||
"model": "SmartSwitch",
|
||||
"sw_version": "3.3",
|
||||
}
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
"""Check if Tuya switch is on."""
|
||||
|
Reference in New Issue
Block a user