Skip to content

Commit 3ef70f3

Browse files
author
Sven ten Raa
committed
#42 do not match device class empty string to voltage class
1 parent 18aca74 commit 3ef70f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/victron/sensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ def determine_victron_device_class(name, unit):
104104
return SensorDeviceClass.SPEED
105105
elif unit in [member.value for member in UnitOfPressure]:
106106
return SensorDeviceClass.PRESSURE
107-
elif unit in ELECTRIC_POTENTIAL_VOLT:
107+
elif unit == ELECTRIC_POTENTIAL_VOLT:
108108
return SensorDeviceClass.VOLTAGE
109-
elif unit in ELECTRIC_CURRENT_AMPERE:
109+
elif unit == ELECTRIC_CURRENT_AMPERE:
110110
return SensorDeviceClass.CURRENT
111111
return None
112112

0 commit comments

Comments
 (0)