1
mirror of https://github.com/home-assistant/core synced 2024-08-15 18:25:44 +02:00

Remove route sensor of here_travel_time (#79211)

This commit is contained in:
Kevin Stillhammer 2022-09-29 03:50:30 +02:00 committed by GitHub
parent 473d7c484d
commit 45ecddb9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 14 deletions

View File

@ -33,7 +33,6 @@ from .const import (
ATTR_DURATION_IN_TRAFFIC,
ATTR_ORIGIN,
ATTR_ORIGIN_NAME,
ATTR_ROUTE,
CONF_ARRIVAL_TIME,
CONF_DEPARTURE_TIME,
CONF_DESTINATION_ENTITY_ID,
@ -190,7 +189,6 @@ class HereTravelTimeDataUpdateCoordinator(DataUpdateCoordinator):
ATTR_DURATION: round(summary["baseTime"] / 60), # type: ignore[misc]
ATTR_DURATION_IN_TRAFFIC: round(traffic_time / 60),
ATTR_DISTANCE: distance,
ATTR_ROUTE: response.route_short,
ATTR_ORIGIN: ",".join(origin),
ATTR_DESTINATION: ",".join(destination),
ATTR_ORIGIN_NAME: waypoint[0]["mappedRoadName"],

View File

@ -69,7 +69,6 @@ UNITS = [CONF_UNIT_SYSTEM_METRIC, CONF_UNIT_SYSTEM_IMPERIAL]
ATTR_DURATION = "duration"
ATTR_DISTANCE = "distance"
ATTR_ROUTE = "route"
ATTR_ORIGIN = "origin"
ATTR_DESTINATION = "destination"

View File

@ -13,7 +13,6 @@ class HERERoutingData(TypedDict):
ATTR_DURATION: float
ATTR_DURATION_IN_TRAFFIC: float
ATTR_DISTANCE: float
ATTR_ROUTE: str
ATTR_ORIGIN: str
ATTR_DESTINATION: str
ATTR_ORIGIN_NAME: str

View File

@ -38,7 +38,6 @@ from .const import (
ATTR_DURATION_IN_TRAFFIC,
ATTR_ORIGIN,
ATTR_ORIGIN_NAME,
ATTR_ROUTE,
DOMAIN,
ICON_CAR,
ICONS,
@ -64,11 +63,6 @@ def sensor_descriptions(travel_mode: str) -> tuple[SensorEntityDescription, ...]
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=TIME_MINUTES,
),
SensorEntityDescription(
name="Route",
icon="mdi:directions",
key=ATTR_ROUTE,
),
)

View File

@ -179,10 +179,6 @@ async def test_sensor(
hass.states.get("sensor.test_distance").attributes.get(ATTR_UNIT_OF_MEASUREMENT)
== expected_distance_unit
)
assert hass.states.get("sensor.test_route").state == (
"US-29 - K St NW; US-29 - Whitehurst Fwy; "
"I-495 N - Capital Beltway; MD-187 S - Old Georgetown Rd"
)
assert (
hass.states.get("sensor.test_duration_in_traffic").state
== expected_duration_in_traffic