From 1928da1fae63a7202bc99b11448cc29905cbd737 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 20 Jun 2017 12:09:42 +0200 Subject: [PATCH] Remove config details (see docs) (#8119) --- homeassistant/components/cover/knx.py | 34 +++++++-------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/homeassistant/components/cover/knx.py b/homeassistant/components/cover/knx.py index d502984d3e5..4252d3a9b10 100644 --- a/homeassistant/components/cover/knx.py +++ b/homeassistant/components/cover/knx.py @@ -1,18 +1,8 @@ """ Support for KNX covers. -Tested with an MDT roller shutter -http://www.mdt.de/download/MDT_THB_Jalousieaktor_02.pdf - -Example configuration: - -cover: - - platform: knx - updown_address: 9/0/0 - stop_address: 9/0/1 - setposition_address: 9/0/3 - getposition_address: 9/0/4 - +For more details about this platform, please refer to the documentation at +https://home-assistant.io/components/cover.knx/ """ import logging @@ -27,10 +17,10 @@ import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) -CONF_UPDOWN = 'updown_address' -CONF_STOP = 'stop_address' -CONF_SETPOSITION_ADDRESS = 'setposition_address' CONF_GETPOSITION_ADDRESS = 'getposition_address' +CONF_SETPOSITION_ADDRESS = 'setposition_address' +CONF_STOP = 'stop_address' +CONF_UPDOWN = 'updown_address' DEFAULT_NAME = 'KNX Cover' DEPENDENCIES = ['knx'] @@ -38,10 +28,10 @@ DEPENDENCIES = ['knx'] PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.Required(CONF_UPDOWN): cv.string, vol.Required(CONF_STOP): cv.string, - vol.Optional(CONF_SETPOSITION_ADDRESS): cv.string, + vol.Optional(CONF_DEVICE_CLASS): DEVICE_CLASSES_SCHEMA, vol.Optional(CONF_GETPOSITION_ADDRESS): cv.string, vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, - vol.Optional(CONF_DEVICE_CLASS): DEVICE_CLASSES_SCHEMA + vol.Optional(CONF_SETPOSITION_ADDRESS): cv.string, }) @@ -100,10 +90,7 @@ class KNXCover(KNXMultiAddressDevice, CoverDevice): self._target_pos = position self.set_percentage('setposition', position) - _LOGGER.debug( - "%s: Set target position to %d", - self.name, position - ) + _LOGGER.debug("%s: Set target position to %d", self.name, position) def update(self): """Update device state.""" @@ -111,10 +98,7 @@ class KNXCover(KNXMultiAddressDevice, CoverDevice): value = self.get_percentage('getposition') if value is not None: self._current_pos = value - _LOGGER.debug( - "%s: position = %d", - self.name, value - ) + _LOGGER.debug("%s: position = %d", self.name, value) def open_cover(self, **kwargs): """Open the cover."""