-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'm³/h' and 'MJ' is not valid data type for device class ('gas') - (warning) #85905
Comments
The Each device class, its purpose, and its accepted units have always been documented in our end-user and developer documentation. The checks have been recently added to warn in case device classes have been misused. Both error messages are not a bug but correct warnings, closing the issue for that reason. ../Frenck |
@frenck instead of hurry to close this, please take time to read what was actually lodged. "Not sure if MJ is something that should be added to the SensorDeviceClass.GAS as it is technically a unit of energy ( https://www.elgas.com.au/blog/631-what-is-mj-mega-joule-megajoule-gas-heater/ ) so adding 'MJ' to the SensorDeviceClass.ENERGY would seem the in line with existing HA standards." and: "Integration causing the issue and also that it was flagged that whilst this relates to gas as what it is monitoring, that SensorDeviceClass.ENERGY should also be assigned this. By closing this immediately and not assigning to the dev for SensorDeviceClass.GAS you kill the issue. |
I'm sorry, but I did. You made an assumption there which is not correct.
That is a feature request and not a bug. Device classes are limited in the units they accept. That is currently by design. The allowed units for each device class are documented (as pointed out in my previous response as well).
Our current scope of device classes do not agree. This is not a bug.
It isn't an issue to start with. Hence it was closed. ../Frenck |
@frenck . OK many thanks :-) |
The problem
Hi,
Since upgrading from 2023.1 yesterday, I am now getting the warning that 'm³/h' and 'MJ' (megajoules) are not valid units of measurements for the sensor class of gas.
Is this something that can be added into the sensor class to be supported, as:
As with use of pulse_meter for gas etc, there is the use of 'm³/h' to support monitoring the flow rate of the gas in general as well as being able to use it to notice and leaks.
In Australia (and probably other countries) we are billed upon the MJ of energy consumed (having to apply a correction factor x0.9775 in my gas network providers case, and then a conversion factor x38.29 to get from m3 to MJ) and not m³, ft³ or CCF.
Not sure if MJ is something that should be added to the SensorDeviceClass.GAS as it is technically a unit of energy ( https://www.elgas.com.au/blog/631-what-is-mj-mega-joule-megajoule-gas-heater/ ) so adding 'MJ' to the SensorDeviceClass.ENERGY would seem the in line with existing HA standards.
What version of Home Assistant Core has the issue?
2023.1.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Gas Sensor (and Energy Sensor potentially)
Link to integration documentation on our website
No response
Diagnostics information
N/A
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: