p0l0 / hagruenbeck_cloud

Home Assistant integration for Grünbeck Cloud based Water softeners
MIT License
36 stars 1 forks source link

Wrong unit of measurement #121

Open Lorenz38 opened 3 weeks ago

Lorenz38 commented 3 weeks ago

System Health details

System Information

version core-2024.9.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.31-haos-raspi
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1395 Downloaded Repositories | 3 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.1 -- | -- update_channel | stable supervisor_version | supervisor-2024.08.0 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 233.8 GB disk_used | 6.6 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | board | rpi5-64 supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (18.0.0), File editor (5.8.0), Mosquitto broker (6.4.1), Zigbee2MQTT (1.39.1-1), Studio Code Server (5.15.0), Cloudflared (5.1.19)
Dashboards dashboards | 2 -- | -- resources | 0 views | 1 mode | storage
Recorder oldest_recorder_run | 8. September 2024 um 17:08 -- | -- current_recorder_run | 8. September 2024 um 21:33 estimated_db_size | 60.21 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

Hi, I have installed your Grünbeck integration and it works pretty well. I just noticed that the sensor wich measures the current waterflow is shown in m³ and not in m³/h.

I found this section of the code in _custom_components/gruenbeckcloud/sensor.py :

GruenbeckCloudEntityDescription(
    key="current_flow_rate",
    translation_key="current_flow_rate",
    native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
    device_class=SensorDeviceClass.VOLUME,
    value_fn=lambda device: device.realtime.current_flow_rate,

Is it possible tochange the unit? Where can I do so? I am a relatively new user of home assistant and don't have much experience in this topic.

In the Grünbeck App, the water flow has the right unit. signal-2024-09-10-085701

Reproduction steps

1. 2. 3. ...

Debug logs

GruenbeckCloudEntityDescription(
        key="current_flow_rate",
        translation_key="current_flow_rate",
        native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
        device_class=SensorDeviceClass.VOLUME,
        value_fn=lambda device: device.realtime.current_flow_rate,

Diagnostics dump

No response

RALFISBORN commented 6 days ago

Have you also set the unit system to metric in the general settings? My default setting was also US standard image

RALFISBORN commented 5 days ago

@p0l0 Yesterday I updated the integration to 0.2.0, but the salt supply still says days instead of days: image

In the fix I only read that the m³ were corrected. But not the days. Is this the reason?

p0l0 commented 5 days ago

The fix for m3/h is planed for the next major release 1.0.0, it's not part of 0.0.2, that was only a fix for installation problems with HA 2024.10.

The problem with "days", is that the units can not be translated directly in an integration and HA doesn't provide "day/days" as a unit of measurement.

RALFISBORN commented 5 days ago

The fix for m3/h is planed for the next major release 1.0.0, it's not part of 0.0.2, that was only a fix for installation problems with HA 2024.10.

The problem with "days", is that the units can not be translated directly in an integration and HA doesn't provide "day/days" as a unit of measurement.

Ok, thanks for fast reply and the information :)

Lorenz38 commented 27 minutes ago

Have you also set the unit system to metric in the general settings? My default setting was also US standard image

Sorry, for the late response @RALFISBORN I checkt my settings, it's the metric system.