Add device_class support to cover component (#5881)

This commit is contained in:
Adam Mills 2017-02-12 14:08:06 -05:00 committed by Paulus Schoutsen
parent 2103bfc824
commit e4bbe37112
4 changed files with 42 additions and 10 deletions

View file

@ -140,3 +140,8 @@ class ZwaveGarageDoor(zwave.ZWaveDeviceEntity, CoverDevice):
def open_cover(self):
"""Open the garage door."""
self._value.data = True
@property
def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES."""
return 'garage'