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:
Robert Svensson 2019-09-14 19:15:18 +02:00 committed by GitHub
parent 24f1ff0aef
commit 41c9ed5d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 48 deletions

View file

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