Cleanup sensor tests (#126881)

This commit is contained in:
epenet 2024-09-27 13:43:24 +02:00 committed by GitHub
parent 59a690f214
commit 94efd3e230
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 4 deletions

View File

@ -51,7 +51,6 @@ def test_matches_device_classes(device_class: SensorDeviceClass) -> None:
SensorDeviceClass.BATTERY: "CONF_IS_BATTERY_LEVEL",
SensorDeviceClass.CO: "CONF_IS_CO",
SensorDeviceClass.CO2: "CONF_IS_CO2",
SensorDeviceClass.CONDUCTIVITY: "CONF_IS_CONDUCTIVITY",
SensorDeviceClass.ENERGY_STORAGE: "CONF_IS_ENERGY",
SensorDeviceClass.VOLUME_STORAGE: "CONF_IS_VOLUME",
}.get(device_class, f"CONF_IS_{device_class.value.upper()}")
@ -60,7 +59,6 @@ def test_matches_device_classes(device_class: SensorDeviceClass) -> None:
# Ensure it has correct value
constant_value = {
SensorDeviceClass.BATTERY: "is_battery_level",
SensorDeviceClass.CONDUCTIVITY: "is_conductivity",
SensorDeviceClass.ENERGY_STORAGE: "is_energy",
SensorDeviceClass.VOLUME_STORAGE: "is_volume",
}.get(device_class, f"is_{device_class.value}")

View File

@ -55,7 +55,6 @@ def test_matches_device_classes(device_class: SensorDeviceClass) -> None:
SensorDeviceClass.BATTERY: "CONF_BATTERY_LEVEL",
SensorDeviceClass.CO: "CONF_CO",
SensorDeviceClass.CO2: "CONF_CO2",
SensorDeviceClass.CONDUCTIVITY: "CONF_CONDUCTIVITY",
SensorDeviceClass.ENERGY_STORAGE: "CONF_ENERGY",
SensorDeviceClass.VOLUME_STORAGE: "CONF_VOLUME",
}.get(device_class, f"CONF_{device_class.value.upper()}")
@ -64,7 +63,6 @@ def test_matches_device_classes(device_class: SensorDeviceClass) -> None:
# Ensure it has correct value
constant_value = {
SensorDeviceClass.BATTERY: "battery_level",
SensorDeviceClass.CONDUCTIVITY: "conductivity",
SensorDeviceClass.ENERGY_STORAGE: "energy",
SensorDeviceClass.VOLUME_STORAGE: "volume",
}.get(device_class, device_class.value)