Fix Lutron Caseta devices loading when missing serials (#38255)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
pull/38515/head
Shane Qi 2020-08-03 09:50:47 -05:00 committed by GitHub
parent b3fd8a8343
commit 85497c6b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -56,6 +56,16 @@ class LutronOccupancySensor(LutronCasetaDevice, BinarySensorEntity):
"""Return a unique identifier."""
return f"occupancygroup_{self.device_id}"
@property
def device_info(self):
"""Return the device info.
Sensor entities are aggregated from one or more physical
sensors by each room. Therefore, there shouldn't be devices
related to any sensor entities.
"""
return None # pylint: disable=useless-return
@property
def device_state_attributes(self):
"""Return the state attributes."""