Skip to content
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

Energy Dashboard Gas and Water supported units of measure limitation (CCF and others) #15038

Closed
3 tasks done
alvinchen1 opened this issue Jan 8, 2023 · 1 comment
Closed
3 tasks done

Comments

@alvinchen1
Copy link
Contributor

alvinchen1 commented Jan 8, 2023

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

Hello, @epenet did some amazing work last month adding CCF measurement units to water and gas (see home-assistant/core#85190, home-assistant/core#84029)

As of 2023.1.0, Gas and Water now support CENTUM_CUBIC_FEET but the Energy Dashboard does not support adding consumption entities that use this and some other previous units of measurement.

According to https://github.com/home-assistant/core/blob/dev/homeassistant/components/energy/validate.py

Gas Valid Energy Units are: ft3 (cubic_feet), m3 (cubic_meter), and CCF (centum_cubic_feet)

Water Valid Energy Units are: ft3 (cubic_feet), m3 (cubic meter), CCF (centum_cubic_feet), gal (gallon), and L (liter)

When trying to add Gas or Water Consumption to Energy Dashboard, the valid units it will accept are:

Gas Usage: ft3 (cubic_feet), m3 (cubic_meter)

image

Water Usage: m3 (cubic_meter), gl (gallon)

image

Also side node that thoughout Core, gallon is gal, in energy dashboard it is gl (not a big deal, but just a consistency note)

image

Describe the behavior you expected

Allow Energy Dashboard to accept Gas and Water consumption in all valid units of measure.

Specifically:

Add Gas CCF (centum_cubic_feet)
Add Water CCF (centum_cubic_feet), ft3 (cubic feet), and L (liter)

Steps to reproduce the issue

  1. goto .../config/energy
  2. Add Gas Consumption
  3. Gas Entity using CCF not listed/selectable, cancel
  4. Add Water Consumption
  5. Water Entity using CCF, ft3 or L not listed/selectable, cancel

What version of Home Assistant Core has the issue?

core-2023.1.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Microsoft Edge Version 108.0.1462.54 (Official build) (64-bit)

Which operating system are you using to run this browser?

Windows 10 Version 22H2

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

Slight workaround:

I was able to change the unit of measurement for Gas and Water entities to one of the currently supported units of measurement, add it to the energy dashboard, then switch the unit back to the desired unit of measure. So the entity has the correct device class and presumably unit class, if applicable.

However, the information in Energy Dashboard appears as the unit of measure of used at the time of adding the entity. The dashboard should reflect the desired unit of measure.

image

image

I'm very new and my last Frontend PR introduced a bug that I didn't see in my testing, so I'm a little shy about coding, but I did a little bit of digging and I believe the issue may be here:

https://github.com/home-assistant/frontend/blob/dev/src/panels/config/energy/dialogs/dialog-energy-gas-settings.ts

line 90 for gas, but I don't see a similar one for water

https://github.com/home-assistant/frontend/blob/dev/src/panels/config/energy/dialogs/dialog-energy-water-settings.ts

@alvinchen1
Copy link
Contributor Author

Appears to be addressed by #15205. Close when merged?

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants