From 9f08c0aa8f20f9ab83fb491e43062a2e255b73f1 Mon Sep 17 00:00:00 2001 From: Sven ten Raa Date: Fri, 5 May 2023 20:45:49 +0200 Subject: [PATCH 1/2] Change volume class to volume storage since tank etc entities are storage instead of consumption based --- custom_components/victron/manifest.json | 2 +- custom_components/victron/sensor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/victron/manifest.json b/custom_components/victron/manifest.json index 57ade4d..2e9295b 100644 --- a/custom_components/victron/manifest.json +++ b/custom_components/victron/manifest.json @@ -16,5 +16,5 @@ "@sfstar" ], "iot_class": "local_polling", - "version": "0.0.1" + "version": "0.0.11" } diff --git a/custom_components/victron/sensor.py b/custom_components/victron/sensor.py index 57d866b..2452796 100644 --- a/custom_components/victron/sensor.py +++ b/custom_components/victron/sensor.py @@ -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 From b4f7c94c48a84cbf99f3958281b6f6c44bfa6726 Mon Sep 17 00:00:00 2001 From: Sven ten Raa Date: Fri, 5 May 2023 20:51:07 +0200 Subject: [PATCH 2/2] attempt to fix hassfest by sorting manifest keys --- custom_components/victron/manifest.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/custom_components/victron/manifest.json b/custom_components/victron/manifest.json index 2e9295b..a0988e1 100644 --- a/custom_components/victron/manifest.json +++ b/custom_components/victron/manifest.json @@ -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.11" + "version": "0.0.11", + "zeroconf": [] }