More tolerant KNX component if gateway cant be connected (#11511)

* Issue #11432: Do not stop initializing KNX when tunelling device cant be reached

*  Issue #11432: Mark devices as unavailable if gateway cant be connected
This commit is contained in:
Julius Mittenzwei 2018-01-07 22:39:14 +01:00 committed by Paulus Schoutsen
parent c20324793e
commit efb83dde19
7 changed files with 38 additions and 4 deletions

View file

@ -129,6 +129,11 @@ class KNXBinarySensor(BinarySensorDevice):
"""Return the name of the KNX device."""
return self.device.name
@property
def available(self):
"""Return True if entity is available."""
return self.hass.data[DATA_KNX].connected
@property
def should_poll(self):
"""No polling needed within KNX."""