Add unique-ids to maxcube component (#49196)

This commit is contained in:
Unai 2021-04-14 22:19:24 +02:00 committed by GitHub
parent 8ce74e598d
commit aaa600e00a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 0 deletions

View file

@ -35,6 +35,11 @@ class MaxCubeShutter(BinarySensorEntity):
"""Return the name of the BinarySensorEntity."""
return self._name
@property
def unique_id(self):
"""Return a unique ID."""
return self._device.serial
@property
def device_class(self):
"""Return the class of this sensor."""