Skip to content

Commit

Permalink
#42 do not match device class empty string to voltage class
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven ten Raa committed Feb 3, 2023
1 parent 18aca74 commit 3ef70f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/victron/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def determine_victron_device_class(name, unit):
return SensorDeviceClass.SPEED
elif unit in [member.value for member in UnitOfPressure]:
return SensorDeviceClass.PRESSURE
elif unit in ELECTRIC_POTENTIAL_VOLT:
elif unit == ELECTRIC_POTENTIAL_VOLT:
return SensorDeviceClass.VOLTAGE
elif unit in ELECTRIC_CURRENT_AMPERE:
elif unit == ELECTRIC_CURRENT_AMPERE:
return SensorDeviceClass.CURRENT
return None

Expand Down

0 comments on commit 3ef70f3

Please sign in to comment.