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

[profiles] Add divide system profile #4151

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

watou
Copy link

@watou watou commented Mar 16, 2024

The offset profile addresses addition and subtraction, but there are use cases for division and multiplication that should be addressed by a complementary system profile.

Some use cases can be addressed with UoM where the items use SI units and devices report in factors of 10 different from desired (such as a devices reporting tenths of Volts so specifying unit="dV" solves that). However other use cases cannot be addressed, such as reporting tenths of kWh but there is no suitable SI unit, or when there is no suitable UoM concept for the data.

See #3538 for further discussion. I can add other doc and UI PRs with some guidance. Thanks!

@watou watou requested a review from a team as a code owner March 16, 2024 09:32
@J-N-K
Copy link
Member

J-N-K commented Mar 16, 2024

We had a discussion about that some years ago and the result was that only the most basic profiles should be part of core and other profiles should go into add-ons, see #779.

@watou
Copy link
Author

watou commented Mar 16, 2024

@J-N-K I've read #779 and I believe this PR meets its spirit and your comment above. To have the offset profile is only half of basic arithmetic (add/subtract), while adding this profile merely fills the absence of the other basic arithmetic operators (divide/multiply). I don't think overloading the offset profile as proposed in #3538 was appropriate, but the need discussed was never met. I agree that all other manipulation (computation, string formatting, etc.) should go through the transformation path.

Signed-off-by: John Cocula <john@cocula.com>
Signed-off-by: John Cocula <john@cocula.com>
Signed-off-by: John Cocula <john@cocula.com>
Signed-off-by: John Cocula <john@cocula.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants