deCONZ - battery sensor instead of battery attribute (#26591)
* Allow all sensors to create battery sensors * Neither binary sensor, climate nor sensor will have battery attributes
This commit is contained in:
parent
24f1ff0aef
commit
41c9ed5d51
5 changed files with 49 additions and 48 deletions
|
@ -24,10 +24,10 @@ class DeconzBase:
|
|||
@property
|
||||
def serial(self):
|
||||
"""Return a serial number for this device."""
|
||||
if self.unique_id is None or self.unique_id.count(":") != 7:
|
||||
if self._device.uniqueid is None or self._device.uniqueid.count(":") != 7:
|
||||
return None
|
||||
|
||||
return self.unique_id.split("-", 1)[0]
|
||||
return self._device.uniqueid.split("-", 1)[0]
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue