mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
User core constants for deutsche_bahn (#46028)
This commit is contained in:
parent
6e9aa254d5
commit
2b17ba1dc4
@ -5,13 +5,13 @@ import schiene
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
|
from homeassistant.const import CONF_OFFSET
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
CONF_DESTINATION = "to"
|
CONF_DESTINATION = "to"
|
||||||
CONF_START = "from"
|
CONF_START = "from"
|
||||||
CONF_OFFSET = "offset"
|
|
||||||
DEFAULT_OFFSET = timedelta(minutes=0)
|
DEFAULT_OFFSET = timedelta(minutes=0)
|
||||||
CONF_ONLY_DIRECT = "only_direct"
|
CONF_ONLY_DIRECT = "only_direct"
|
||||||
DEFAULT_ONLY_DIRECT = False
|
DEFAULT_ONLY_DIRECT = False
|
||||||
@ -87,7 +87,6 @@ class SchieneData:
|
|||||||
|
|
||||||
def __init__(self, start, goal, offset, only_direct):
|
def __init__(self, start, goal, offset, only_direct):
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
|
|
||||||
self.start = start
|
self.start = start
|
||||||
self.goal = goal
|
self.goal = goal
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user