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
|
@ -27,6 +27,11 @@ class DeconzEvent(DeconzBase):
|
|||
self.event_id = slugify(self._device.name)
|
||||
_LOGGER.debug("deCONZ event created: %s", self.event_id)
|
||||
|
||||
@property
|
||||
def device(self):
|
||||
"""Return Event device."""
|
||||
return self._device
|
||||
|
||||
@callback
|
||||
def async_will_remove_from_hass(self) -> None:
|
||||
"""Disconnect event object when removed."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue