Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mark1foley committed Oct 23, 2022
1 parent 94c89dc commit b4cb95f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Configuration variables:
- **update_frequency** (*Optional*): Frequency (in seconds) that updates occur. Default is 60
- **vehicle_position_url** (*Optional*): Provides live position tracking on the home assistant map
- **api_key** (*Optional*): If provided, this key will be sent with API requests in an "Authorization" header.
- **x_api_key** (*Optional*): If provided, this key will be sent with API requests in an "Authorization" header.
- **x_api_key** (*Optional*): If provided, this key will be sent with API requests in an "x_api_key" header.
- **route_delimiter** (*Optional*): If provided, the text in the feed's route id before the delimiter is used as the route id. Useful if the provider incorporates calendar ids into their route ids.
- **departures** (*Required*): A list of routes and departure locations to watch
- **name** (*Required*): The name of the sensor in HA. When displaying on the map card HA generates the name using the first letters of the first 3 words. So, 1<space>0<space>7<space>Bus shows as "107" on the map. Different labels can be defined when displaying the sensor on an entiry card etc.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/gtfs_rt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def due_in_minutes(timestamp):
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Get the public transport sensor."""

data = PublicTransportData(config.get(CONF_TRIP_UPDATE_URL), config.get(CONF_VEHICLE_POSITION_URL), config.get(CONF_ROUTE_DELIMITER), config.get(CONF_API_KEY, config.get(CONF_X_API_KEY)))
data = PublicTransportData(config.get(CONF_TRIP_UPDATE_URL), config.get(CONF_VEHICLE_POSITION_URL), config.get(CONF_ROUTE_DELIMITER), config.get(CONF_API_KEY), config.get(CONF_X_API_KEY))
sensors = []
for departure in config.get(CONF_DEPARTURES):
sensors.append(PublicTransportSensor(
Expand Down

0 comments on commit b4cb95f

Please sign in to comment.