openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[basicprofiles] Add divide profile #17357

Open watou opened 2 months ago

watou commented 2 months ago

I had submitted https://github.com/openhab/openhab-core/pull/4151 six months ago because of a genuine need for the profile and it being clearly appropriate to be in core alongside the offset profile in order to complete the basic arithmetic operations. Despite all of this, no core maintainer has chosen to spend any time on it, so I'm asking that it ends up in this add-on instead, just so it can be available to users.

jimtng commented 2 months ago

I think the plan / idea was to create a separate add-on for "math" transforms / profiles, in which the divide, or a more generically, a gain/offset profile could be implemented.

watou commented 2 months ago

Thank you for commenting. Where is this discussion occurring, or has some group already decided what some future course of action will be? My completed/tested PR appeared to quietly die months ago, aven though it's only a simple companion to the offset profile.

jimtng commented 2 months ago

https://github.com/openhab/openhab-core/pull/3547#issuecomment-1516756612

watou commented 2 months ago

Thank you for the link. I read it before submitting my PR as it seemed like unresolved conversation, and my PR only fills in the missing arithmetic without changing existing profiles. Is it likely that a decision will be taken to break current offset profile users by removing it from core? If not, why not just fill the obvious gap with the divide PR as is? If so, why not re-home the offset profile here as a "basic profile" and add the divide profile PR alongside?

jimtng commented 2 months ago

The current core offset profile will most likely be left alone to maintain compatibility.

I am not a maintainer, so I'm really not the person to talk to. As you can see I tried submitting that PR above and also #3534 both not accepted. If I find the link I'll post it here - they're trying to avoid a proliferation of profiles, and that's why it was suggested that we add them to add-ons, and as the link above suggested, things like offset/gain profile should go into a "Math" add-on.