mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Use new DISTANCE and VOLUME device classes in Renault (#77488)
This commit is contained in:
parent
010430780e
commit
1b8bed936c
@ -225,6 +225,7 @@ SENSOR_TYPES: tuple[RenaultSensorEntityDescription[Any], ...] = (
|
||||
key="battery_autonomy",
|
||||
coordinator="battery",
|
||||
data_key="batteryAutonomy",
|
||||
device_class=SensorDeviceClass.DISTANCE,
|
||||
entity_class=RenaultSensor[KamereonVehicleBatteryStatusData],
|
||||
icon="mdi:ev-station",
|
||||
name="Battery autonomy",
|
||||
@ -265,6 +266,7 @@ SENSOR_TYPES: tuple[RenaultSensorEntityDescription[Any], ...] = (
|
||||
key="mileage",
|
||||
coordinator="cockpit",
|
||||
data_key="totalMileage",
|
||||
device_class=SensorDeviceClass.DISTANCE,
|
||||
entity_class=RenaultSensor[KamereonVehicleCockpitData],
|
||||
icon="mdi:sign-direction",
|
||||
name="Mileage",
|
||||
@ -276,6 +278,7 @@ SENSOR_TYPES: tuple[RenaultSensorEntityDescription[Any], ...] = (
|
||||
key="fuel_autonomy",
|
||||
coordinator="cockpit",
|
||||
data_key="fuelAutonomy",
|
||||
device_class=SensorDeviceClass.DISTANCE,
|
||||
entity_class=RenaultSensor[KamereonVehicleCockpitData],
|
||||
icon="mdi:gas-station",
|
||||
name="Fuel autonomy",
|
||||
@ -288,6 +291,7 @@ SENSOR_TYPES: tuple[RenaultSensorEntityDescription[Any], ...] = (
|
||||
key="fuel_quantity",
|
||||
coordinator="cockpit",
|
||||
data_key="fuelQuantity",
|
||||
device_class=SensorDeviceClass.VOLUME,
|
||||
entity_class=RenaultSensor[KamereonVehicleCockpitData],
|
||||
icon="mdi:fuel",
|
||||
name="Fuel quantity",
|
||||
|
@ -132,6 +132,7 @@ MOCK_VEHICLES = {
|
||||
],
|
||||
Platform.SENSOR: [
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_battery_autonomy",
|
||||
ATTR_ICON: "mdi:ev-station",
|
||||
ATTR_STATE: "141",
|
||||
@ -194,6 +195,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: TIME_MINUTES,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_mileage",
|
||||
ATTR_ICON: "mdi:sign-direction",
|
||||
ATTR_STATE: "49114",
|
||||
@ -349,6 +351,7 @@ MOCK_VEHICLES = {
|
||||
],
|
||||
Platform.SENSOR: [
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_battery_autonomy",
|
||||
ATTR_ICON: "mdi:ev-station",
|
||||
ATTR_STATE: "128",
|
||||
@ -411,6 +414,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: TIME_MINUTES,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_mileage",
|
||||
ATTR_ICON: "mdi:sign-direction",
|
||||
ATTR_STATE: "49114",
|
||||
@ -566,6 +570,7 @@ MOCK_VEHICLES = {
|
||||
],
|
||||
Platform.SENSOR: [
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_battery_autonomy",
|
||||
ATTR_ICON: "mdi:ev-station",
|
||||
ATTR_STATE: "141",
|
||||
@ -628,6 +633,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: TIME_MINUTES,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_fuel_autonomy",
|
||||
ATTR_ICON: "mdi:gas-station",
|
||||
ATTR_STATE: "35",
|
||||
@ -636,6 +642,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: LENGTH_KILOMETERS,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.VOLUME,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_fuel_quantity",
|
||||
ATTR_ICON: "mdi:fuel",
|
||||
ATTR_STATE: "3",
|
||||
@ -644,6 +651,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: VOLUME_LITERS,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_mileage",
|
||||
ATTR_ICON: "mdi:sign-direction",
|
||||
ATTR_STATE: "5567",
|
||||
@ -749,6 +757,7 @@ MOCK_VEHICLES = {
|
||||
Platform.SELECT: [],
|
||||
Platform.SENSOR: [
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_fuel_autonomy",
|
||||
ATTR_ICON: "mdi:gas-station",
|
||||
ATTR_STATE: "35",
|
||||
@ -757,6 +766,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: LENGTH_KILOMETERS,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.VOLUME,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_fuel_quantity",
|
||||
ATTR_ICON: "mdi:fuel",
|
||||
ATTR_STATE: "3",
|
||||
@ -765,6 +775,7 @@ MOCK_VEHICLES = {
|
||||
ATTR_UNIT_OF_MEASUREMENT: VOLUME_LITERS,
|
||||
},
|
||||
{
|
||||
ATTR_DEVICE_CLASS: SensorDeviceClass.DISTANCE,
|
||||
ATTR_ENTITY_ID: "sensor.reg_number_mileage",
|
||||
ATTR_ICON: "mdi:sign-direction",
|
||||
ATTR_STATE: "5567",
|
||||
|
Loading…
x
Reference in New Issue
Block a user