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
pull/11589/head
Thijs de Jong 2018-01-12 16:04:44 +01:00 committed by Fabian Affolter
parent f2cc00cc64
commit 1802c0a922
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336
1 changed files with 7 additions and 1 deletions

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