Add Mega Joule as valid unit of energy#86055
Conversation
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
I will be looking through the dev checklist and documentation now but wanted to see if I am on the right track with the changes so far. |
Add Mega Joule as a Unit of Measurement to Energy
|
Please take a look at #85964 |
|
Indeed, marking this PR as draft. These are part of our entity models and need an architectural proposal/discussions and approval prior to implementation. ../Frenck |
|
Discussion: home-assistant/architecture#859 |
|
@SgtBatten thanks for merging. Apologies on stuffing it up, as that was my original intent to add to your PR (hence my tagging), as I noticed that you had missed updating homeassistant/components/sensor/const.py and updating the doco to add suppport/mention of MJ in those files. |
|
This PR will need a docs PR for |
|
For reference, needs adjustments in:
|
Not 100% sure on the documentation side of things. |
sorry about the jargon; "dev docs" refers to updating developers.home-assistant, "user docs" refers to updating home-assistant.io |
|
|
| """Energy. | ||
|
|
||
| Unit of measurement: `Wh`, `kWh`, `MWh`, `GJ` | ||
| Unit of measurement: `Wh`, `kWh`, `MWh`, `MJ`, `GJ` |
There was a problem hiding this comment.
The same change is needed in number platform.
emontnemery
left a comment
There was a problem hiding this comment.
Thanks, @SgtBatten 👍
|
Sorry i was so slow, thanks for resolving for me |
Proposed change
This Pull request adds Mega Joules as a valid energy type. In Australia our gas usage is billed in MJ despite our meters being in Cubic meters. This change provides us more flexibility in configuring our energy sensors.
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.To help with the load of incoming pull requests: