Remove config details (see docs) (#8119)

This commit is contained in:
Fabian Affolter 2017-06-20 12:09:42 +02:00 committed by Pascal Vizeli
parent 06b051c53d
commit 1928da1fae

View file

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