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
This commit is contained in:
Thijs de Jong 2018-01-12 16:04:44 +01:00 committed by Pascal Vizeli
parent dacd7cd8a4
commit cc236529c4

View File

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