I’m using home assistant 2024.7.0
I integrated my gas utility meter via rtlamr2mqtt addon with the following config:
id: 12345678
protocol: scm+
name: meter_gas
format: "######.##"
unit_of_measurement: CCF
icon: mdi:fire
device_class: gas
state_class: total_increasing
With this, home assistant can properly read the values of my gas meter which can be confirmed by going to Developer tools → States and looking for the value of sensor.meter_gas
As you can see, everything seems to be working properly and the meter is measuring in CCF units to match my electric bill.
However, when I add this sensor to the energy dashboard (under gas consumption) it automatically convert the CCF to FT3. This is weird because home assistant indicates CCF as one of the compatible measurement units and my sensor is already measuring in CCF.
Do anybody knows how to make homeassistant to use CCF as the measurement for GAS in the energy dashboard?
This post seems to ask the same situation that I have but that was in 2023.1 and no resolution was given
opened 10:30PM - 11 Jan 23 UTC
closed 04:05PM - 13 May 23 UTC
stale
### The problem
Testing out the addition of CCF as units for 2023.1.
Have conf… igured a gas sensor with units of 'CCF' and have configured this sensor into the Energy Panel/Dashboard.
The Energy Dashboard takes the hourly delta values from the gas sensor, and displays the values not as is with units of CCF, but instead multiplies the values by 100 and shows units in ft³.
Not sure if this is actually design intent, but being gas companies (at least mine) provide billing based on CCF usage, I would expect the Energy Dashboard to show usage in CCF as well. My sensor reports in CCF and prior to this release's support for CCF units, I set the units to ft³ and just ignored the ft³ shown in the graphs. The values were always in CCF and they (for the most part) match the CCF values in my gas provider's bill which was what I was after.
### What version of Home Assistant Core has the issue?
2023.1.2
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Energy
### Link to integration documentation on our website
https://www.home-assistant.io/docs/energy
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
mqtt:
sensor:
- name: Gas Meter CCF
unique_id: "15087054" #rng 1-100M
icon: mdi:gauge
state_topic: "gasmeter/outside/value"
unit_of_measurement: 'CCF'
device_class: 'gas'
state_class: 'total_increasing' #value monotonically increasing
value_template: " {{ ( value | multiply(1)) | round (2) }}"
```
### Anything in the logs that might be useful for us?
_No response_
### Additional information
Snippets from the history graph of the meter called "Gas Meter CCF"
The first sample:
![image](https://user-images.githubusercontent.com/35182132/211928261-670af938-19dc-4b8a-9e60-72472a23c238.png)
The second sample
![image](https://user-images.githubusercontent.com/35182132/211928398-d7de9f70-e155-4cd5-9ee1-3221206f626f.png)
The difference: 9381.22 CCF - 9380.3 CCF = 0.92 CCF
The third bar shows the Energy Dashboard reading for this difference as 92 ft³
![image](https://user-images.githubusercontent.com/35182132/211927446-7ae8bca8-d825-4dbb-9dfe-5c2ca6ea1fbe.png)
Help?!
This is a screenshot of my Gas energy consumption graphic and as you can see it is using FT3 as the unit of measurement but the sensor is using CCF.
and this is the state of the sensor indicating it is measuring in CCF
karwosts
(karwosts)
July 14, 2024, 12:36pm
4
I believe energy dashboard graphs always convert to ft3 for imperial, or m3 for metric. Don’t think there’s any way for user to change it.
Based on your comment it sounds like this may be a software limitation but i hope you are wrong.
I mean, what is the point in the energy dashboard accepting a sensor that measures CCF if it’s not going to use it?
At that point just tell the user that the integration only accept sensors en either m3 or ft3 and be done with it, no confusion at all.
karwosts
(karwosts)
July 15, 2024, 11:47am
6
It does use the unit to apply the correct conversion ratio.
If you would like to see user selectable units for display on the graph, make a post over in Feature Requests (or vote for existing post if there is one).
1 Like
Understood.
Thanks for the advisement. I will make sure to make a feature request.