Update vehicle to 0.2.0 (#59583)

This commit is contained in:
Franck Nijhof 2021-11-12 15:42:46 +01:00 committed by GitHub
parent bcd9f3c05f
commit 5e6ad8977a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -3,7 +3,7 @@
"name": "RDW", "name": "RDW",
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/rdw", "documentation": "https://www.home-assistant.io/integrations/rdw",
"requirements": ["vehicle==0.1.0"], "requirements": ["vehicle==0.2.0"],
"codeowners": ["@frenck"], "codeowners": ["@frenck"],
"quality_scale": "platinum", "quality_scale": "platinum",
"iot_class": "cloud_polling" "iot_class": "cloud_polling"

View File

@ -46,10 +46,10 @@ SENSORS: tuple[RDWSensorEntityDescription, ...] = (
value_fn=lambda vehicle: vehicle.apk_expiration.isoformat(), value_fn=lambda vehicle: vehicle.apk_expiration.isoformat(),
), ),
RDWSensorEntityDescription( RDWSensorEntityDescription(
key="name_registration_date", key="ascription_date",
name="Name Registration Date", name="Ascription Date",
device_class=DEVICE_CLASS_DATE, device_class=DEVICE_CLASS_DATE,
value_fn=lambda vehicle: vehicle.name_registration_date.isoformat(), value_fn=lambda vehicle: vehicle.ascription_date.isoformat(),
), ),
) )

View File

@ -2366,7 +2366,7 @@ uvcclient==0.11.0
vallox-websocket-api==2.8.1 vallox-websocket-api==2.8.1
# homeassistant.components.rdw # homeassistant.components.rdw
vehicle==0.1.0 vehicle==0.2.0
# homeassistant.components.velbus # homeassistant.components.velbus
velbus-aio==2021.11.6 velbus-aio==2021.11.6

View File

@ -1379,7 +1379,7 @@ url-normalize==1.4.1
uvcclient==0.11.0 uvcclient==0.11.0
# homeassistant.components.rdw # homeassistant.components.rdw
vehicle==0.1.0 vehicle==0.2.0
# homeassistant.components.velbus # homeassistant.components.velbus
velbus-aio==2021.11.6 velbus-aio==2021.11.6

View File

@ -34,13 +34,13 @@ async def test_vehicle_sensors(
assert ATTR_STATE_CLASS not in state.attributes assert ATTR_STATE_CLASS not in state.attributes
assert ATTR_UNIT_OF_MEASUREMENT not in state.attributes assert ATTR_UNIT_OF_MEASUREMENT not in state.attributes
state = hass.states.get("sensor.name_registration_date") state = hass.states.get("sensor.ascription_date")
entry = entity_registry.async_get("sensor.name_registration_date") entry = entity_registry.async_get("sensor.ascription_date")
assert entry assert entry
assert state 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.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 state.attributes.get(ATTR_DEVICE_CLASS) == DEVICE_CLASS_DATE
assert ATTR_ICON not in state.attributes assert ATTR_ICON not in state.attributes
assert ATTR_STATE_CLASS not in state.attributes assert ATTR_STATE_CLASS not in state.attributes