This commit is contained in:
parent
de7352dbde
commit
98a3ad6fd4
3 changed files with 9 additions and 5 deletions
|
@ -255,7 +255,7 @@ WHEELCHAIR_BOARDING_DEFAULT = STATE_UNKNOWN
|
||||||
WHEELCHAIR_BOARDING_OPTIONS = {1: True, 2: False}
|
WHEELCHAIR_BOARDING_OPTIONS = {1: True, 2: False}
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
{
|
{ # type: ignore
|
||||||
vol.Required(CONF_ORIGIN): cv.string,
|
vol.Required(CONF_ORIGIN): cv.string,
|
||||||
vol.Required(CONF_DESTINATION): cv.string,
|
vol.Required(CONF_DESTINATION): cv.string,
|
||||||
vol.Required(CONF_DATA): cv.string,
|
vol.Required(CONF_DATA): cv.string,
|
||||||
|
@ -490,7 +490,7 @@ def setup_platform(
|
||||||
origin = config.get(CONF_ORIGIN)
|
origin = config.get(CONF_ORIGIN)
|
||||||
destination = config.get(CONF_DESTINATION)
|
destination = config.get(CONF_DESTINATION)
|
||||||
name = config.get(CONF_NAME)
|
name = config.get(CONF_NAME)
|
||||||
offset = datetime.timedelta(seconds=float(config.get(CONF_OFFSET, 0)))
|
offset = config.get(CONF_OFFSET)
|
||||||
include_tomorrow = config[CONF_TOMORROW]
|
include_tomorrow = config[CONF_TOMORROW]
|
||||||
|
|
||||||
if not os.path.exists(gtfs_dir):
|
if not os.path.exists(gtfs_dir):
|
||||||
|
@ -541,10 +541,10 @@ class GTFSDepartureSensor(SensorEntity):
|
||||||
self._icon = ICON
|
self._icon = ICON
|
||||||
self._name = ""
|
self._name = ""
|
||||||
self._state: str | None = None
|
self._state: str | None = None
|
||||||
self._attributes: dict[str, float | str] = {}
|
self._attributes = {}
|
||||||
|
|
||||||
self._agency = None
|
self._agency = None
|
||||||
self._departure: dict[str, Any] = {}
|
self._departure = {}
|
||||||
self._destination = None
|
self._destination = None
|
||||||
self._origin = None
|
self._origin = None
|
||||||
self._route = None
|
self._route = None
|
||||||
|
@ -559,7 +559,7 @@ class GTFSDepartureSensor(SensorEntity):
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self) -> str | None:
|
def native_value(self) -> str | None: # type: ignore
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
return self._state
|
return self._state
|
||||||
|
|
||||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -1355,6 +1355,9 @@ ignore_errors = true
|
||||||
[mypy-homeassistant.components.growatt_server.*]
|
[mypy-homeassistant.components.growatt_server.*]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
|
[mypy-homeassistant.components.gtfs.*]
|
||||||
|
ignore_errors = true
|
||||||
|
|
||||||
[mypy-homeassistant.components.habitica.*]
|
[mypy-homeassistant.components.habitica.*]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ IGNORED_MODULES: Final[list[str]] = [
|
||||||
"homeassistant.components.gpmdp.*",
|
"homeassistant.components.gpmdp.*",
|
||||||
"homeassistant.components.gree.*",
|
"homeassistant.components.gree.*",
|
||||||
"homeassistant.components.growatt_server.*",
|
"homeassistant.components.growatt_server.*",
|
||||||
|
"homeassistant.components.gtfs.*",
|
||||||
"homeassistant.components.habitica.*",
|
"homeassistant.components.habitica.*",
|
||||||
"homeassistant.components.harmony.*",
|
"homeassistant.components.harmony.*",
|
||||||
"homeassistant.components.hassio.*",
|
"homeassistant.components.hassio.*",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue