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:
parent
8fc27cbe43
commit
e8c6e4d561
28 changed files with 232 additions and 228 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue