Clean-up, ordering, constants, and extend of schema (#2903)

* Clean-up, ordering, constants, and extend of schema

* Put REQUIREMENTS back and re-add line breaks

* Clean-up, ordering, constants, and extend of schema

* Extend platform
This commit is contained in:
Fabian Affolter 2016-08-21 00:40:16 +02:00 committed by Paulus Schoutsen
parent 8fc27cbe43
commit e8c6e4d561
28 changed files with 232 additions and 228 deletions

View file

@ -17,20 +17,20 @@ import homeassistant.util.dt as dt_util
REQUIREMENTS = ['schiene==0.17']
CONF_START = 'from'
_LOGGER = logging.getLogger(__name__)
CONF_DESTINATION = 'to'
CONF_START = 'from'
ICON = 'mdi:train'
_LOGGER = logging.getLogger(__name__)
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=120)
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_DESTINATION): cv.string,
vol.Required(CONF_START): cv.string,
})
# Return cached results if last scan was less then this time ago.
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=120)
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Deutsche Bahn Sensor."""