Implement device_info for LutronCasetaDevice (#36706)

This commit is contained in:
Shane Qi 2020-06-12 19:27:48 -05:00 committed by GitHub
parent 4412ce3b86
commit b78ad7c2b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,6 +127,16 @@ class LutronCasetaDevice(Entity):
"""Return the unique ID of the device (serial)."""
return str(self.serial)
@property
def device_info(self):
"""Return the device info."""
return {
"identifiers": {(DOMAIN, self.serial)},
"name": self.name,
"manufacturer": "Lutron",
"model": self._device["model"],
}
@property
def device_state_attributes(self):
"""Return the state attributes."""