Closed Next9999 closed 1 year ago
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (mopeka
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
mopeka documentation mopeka source (message by IssueLinks)
The tank level in mm conversion to % is pretty easy to do in a template if you know your tank size. It's a simple conversion for vertical tanks. For large horizontal residential tanks it gets a bit more complex becasue a mm of propane at the top or bottom of the horizontal cylinder is a lot less than a mm of propane in the middle.
Both the old Custom Component and the ESPHome components included a few common tank sizes and a custom tank size. All calculations for percent were just (x-min)/(max-min) so not really adapted for horizontal tanks.
Mopeka in their app include a few more: Vertical: 20, 30, 40, 100 lb; 120 gal Horizontal: 120, 150, 250, 500, 1000 gal Arbitrary: select horizontal/vertical and enter height
For those larger residential horizontal cylindrical tanks with hemi-heads you get equations with arccos like shown here: Horizontal Tank Example It would probably be fairly easy to build this out if the common dimensions were known for the different horizontal tank sizes.
500 gal propane tank Mopeka reading to percent.xlsx Here is an example calculation for taking the reading from Mopeka and converting to an accurate volume percent for a horizontal tank. I used the 0.25” thickness from my home 500 gallon tank and other dimensions from Typical Tank Dimensions
It should be pretty simple to make a template sensor to convert the level to a percentage using that example above 👍
Thank you for reaching out. We use GitHub for tracking issues, not for providing support or tracking feature requests.
If you want to suggest a feature, you should try our Community Forum: Feature Requests.
If you have additional questions, feel free to join our Discord chat server.
Thanks! 👍
The problem
Tks for adding the Integrates [Mopeka] sensor,,, very nice for MotorHome But How to get the %.. we are only seeing Tank Level in mm
What version of Home Assistant Core has the issue?
Home Assistant 2023.2.0
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
Mopeka
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mopeka
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response