Skip to content

Commit

Permalink
Merge pull request #70 from sfstar/bugfix/set_correct_device_class_fo…
Browse files Browse the repository at this point in the history
…r_volume_storage

Change volume class to volume storage
  • Loading branch information
sfstar authored May 5, 2023
2 parents 464c082 + b4f7c94 commit 266ca4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions custom_components/victron/manifest.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"domain": "victron",
"name": "victron",
"codeowners": [
"@sfstar"
],
"config_flow": true,
"integration_type": "hub",
"dependencies": [],
"documentation": "https://github.com/sfstar/hass-victron",
"homekit": {},
"integration_type": "hub",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/sfstar/hass-victron/issues",
"requirements": [
"pymodbus==3.1.1"
],
"ssdp": [],
"zeroconf": [],
"homekit": {},
"dependencies": [],
"codeowners": [
"@sfstar"
],
"iot_class": "local_polling",
"version": "0.0.1"
"version": "0.0.11",
"zeroconf": []
}
2 changes: 1 addition & 1 deletion custom_components/victron/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def determine_victron_device_class(name, unit):
elif unit in [member.value for member in UnitOfTemperature]:
return SensorDeviceClass.TEMPERATURE
elif unit in [member.value for member in UnitOfVolume]:
return SensorDeviceClass.VOLUME # Perhaps change this to water if only water is measured in volume units
return SensorDeviceClass.VOLUME_STORAGE # Perhaps change this to water if only water is measured in volume units
elif unit in [member.value for member in UnitOfSpeed]:
if "meteo" in name:
return SensorDeviceClass.WIND_SPEED
Expand Down

0 comments on commit 266ca4a

Please sign in to comment.