mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Update nextbus stop tag to accept strings (#27765)
This commit is contained in:
parent
a63e976496
commit
f8712b4d7f
@ -173,7 +173,7 @@ class NextBusDepartureSensor(Entity):
|
|||||||
"""Update sensor with new departures times."""
|
"""Update sensor with new departures times."""
|
||||||
# Note: using Multi because there is a bug with the single stop impl
|
# Note: using Multi because there is a bug with the single stop impl
|
||||||
results = self._client.get_predictions_for_multi_stops(
|
results = self._client.get_predictions_for_multi_stops(
|
||||||
[{"stop_tag": int(self.stop), "route_tag": self.route}], self.agency
|
[{"stop_tag": self.stop, "route_tag": self.route}], self.agency
|
||||||
)
|
)
|
||||||
|
|
||||||
self._log_debug("Predictions results: %s", results)
|
self._log_debug("Predictions results: %s", results)
|
||||||
|
@ -113,7 +113,7 @@ async def test_verify_valid_state(
|
|||||||
"""Verify all attributes are set from a valid response."""
|
"""Verify all attributes are set from a valid response."""
|
||||||
await assert_setup_sensor(hass, CONFIG_BASIC)
|
await assert_setup_sensor(hass, CONFIG_BASIC)
|
||||||
mock_nextbus_predictions.assert_called_once_with(
|
mock_nextbus_predictions.assert_called_once_with(
|
||||||
[{"stop_tag": int(VALID_STOP), "route_tag": VALID_ROUTE}], VALID_AGENCY
|
[{"stop_tag": VALID_STOP, "route_tag": VALID_ROUTE}], VALID_AGENCY
|
||||||
)
|
)
|
||||||
|
|
||||||
state = hass.states.get(SENSOR_ID_SHORT)
|
state = hass.states.get(SENSOR_ID_SHORT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user