From ef93d48d50bb25b0405cb8adaf044b3ac7268888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=B8yer=20Iversen?= Date: Sun, 21 Oct 2018 13:41:27 +0200 Subject: [PATCH] available to switchmate (#17640) --- homeassistant/components/switch/switchmate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/switch/switchmate.py b/homeassistant/components/switch/switchmate.py index 2ec77a38267..7f00964cd20 100644 --- a/homeassistant/components/switch/switchmate.py +++ b/homeassistant/components/switch/switchmate.py @@ -52,6 +52,11 @@ class Switchmate(SwitchDevice): """Return a unique, HASS-friendly identifier for this entity.""" return self._mac.replace(':', '') + @property + def available(self) -> bool: + """Return True if entity is available.""" + return self._device.available + @property def name(self) -> str: """Return the name of the switch."""