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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Shane Qi
2020-08-03 09:50:47 -05:00
committed by GitHub
parent b3fd8a8343
commit 85497c6b75

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."""