mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Update vehicle to 0.2.0 (#59583)
This commit is contained in:
parent
bcd9f3c05f
commit
5e6ad8977a
@ -3,7 +3,7 @@
|
||||
"name": "RDW",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/rdw",
|
||||
"requirements": ["vehicle==0.1.0"],
|
||||
"requirements": ["vehicle==0.2.0"],
|
||||
"codeowners": ["@frenck"],
|
||||
"quality_scale": "platinum",
|
||||
"iot_class": "cloud_polling"
|
||||
|
@ -46,10 +46,10 @@ SENSORS: tuple[RDWSensorEntityDescription, ...] = (
|
||||
value_fn=lambda vehicle: vehicle.apk_expiration.isoformat(),
|
||||
),
|
||||
RDWSensorEntityDescription(
|
||||
key="name_registration_date",
|
||||
name="Name Registration Date",
|
||||
key="ascription_date",
|
||||
name="Ascription Date",
|
||||
device_class=DEVICE_CLASS_DATE,
|
||||
value_fn=lambda vehicle: vehicle.name_registration_date.isoformat(),
|
||||
value_fn=lambda vehicle: vehicle.ascription_date.isoformat(),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -2366,7 +2366,7 @@ uvcclient==0.11.0
|
||||
vallox-websocket-api==2.8.1
|
||||
|
||||
# homeassistant.components.rdw
|
||||
vehicle==0.1.0
|
||||
vehicle==0.2.0
|
||||
|
||||
# homeassistant.components.velbus
|
||||
velbus-aio==2021.11.6
|
||||
|
@ -1379,7 +1379,7 @@ url-normalize==1.4.1
|
||||
uvcclient==0.11.0
|
||||
|
||||
# homeassistant.components.rdw
|
||||
vehicle==0.1.0
|
||||
vehicle==0.2.0
|
||||
|
||||
# homeassistant.components.velbus
|
||||
velbus-aio==2021.11.6
|
||||
|
@ -34,13 +34,13 @@ async def test_vehicle_sensors(
|
||||
assert ATTR_STATE_CLASS not in state.attributes
|
||||
assert ATTR_UNIT_OF_MEASUREMENT not in state.attributes
|
||||
|
||||
state = hass.states.get("sensor.name_registration_date")
|
||||
entry = entity_registry.async_get("sensor.name_registration_date")
|
||||
state = hass.states.get("sensor.ascription_date")
|
||||
entry = entity_registry.async_get("sensor.ascription_date")
|
||||
assert entry
|
||||
assert state
|
||||
assert entry.unique_id == "11ZKZ3_name_registration_date"
|
||||
assert entry.unique_id == "11ZKZ3_ascription_date"
|
||||
assert state.state == "2021-11-04"
|
||||
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "Name Registration Date"
|
||||
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "Ascription Date"
|
||||
assert state.attributes.get(ATTR_DEVICE_CLASS) == DEVICE_CLASS_DATE
|
||||
assert ATTR_ICON not in state.attributes
|
||||
assert ATTR_STATE_CLASS not in state.attributes
|
||||
|
Loading…
x
Reference in New Issue
Block a user