From 1802c0a922670084d398de05fa9461b0c4c7309f Mon Sep 17 00:00:00 2001 From: Thijs de Jong Date: Fri, 12 Jan 2018 16:04:44 +0100 Subject: [PATCH] Fix Tahoma stop command for 2 types of shutters (#11588) * add working stop command This fixes the stop command for 2 types of roller shutters * fix line too long * fix indentation * fix indentation --- homeassistant/components/cover/tahoma.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/cover/tahoma.py b/homeassistant/components/cover/tahoma.py index d492ad50866..7ec09c781d2 100644 --- a/homeassistant/components/cover/tahoma.py +++ b/homeassistant/components/cover/tahoma.py @@ -15,6 +15,11 @@ DEPENDENCIES = ['tahoma'] _LOGGER = logging.getLogger(__name__) +TAHOMA_STOP_COMMAND = { + 'io:RollerShutterWithLowSpeedManagementIOComponent': 'my', + 'io:RollerShutterVeluxIOComponent': 'my', +} + SCAN_INTERVAL = timedelta(seconds=60) @@ -73,7 +78,8 @@ class TahomaCover(TahomaDevice, CoverDevice): def stop_cover(self, **kwargs): """Stop the cover.""" - self.apply_action('stopIdentify') + self.apply_action(TAHOMA_STOP_COMMAND.get(self.tahoma_device.type, + 'stopIdentify')) def device_class(self): """Return the class of this device, from component DEVICE_CLASSES."""