available to switchmate (#17640)

This commit is contained in:
Daniel Høyer Iversen
2018-10-21 13:41:27 +02:00
committed by GitHub
parent 9982867d66
commit ef93d48d50

View File

@@ -52,6 +52,11 @@ class Switchmate(SwitchDevice):
"""Return a unique, HASS-friendly identifier for this entity.""" """Return a unique, HASS-friendly identifier for this entity."""
return self._mac.replace(':', '') return self._mac.replace(':', '')
@property
def available(self) -> bool:
"""Return True if entity is available."""
return self._device.available
@property @property
def name(self) -> str: def name(self) -> str:
"""Return the name of the switch.""" """Return the name of the switch."""