openhab / openhab-addons

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

Thing actions should have a unique id #17707

Closed lolodomo closed 2 weeks ago

lolodomo commented 3 weeks ago

Bindings sometimes define several thing actions with the same method name leading to thing actions having the same id. It should be fixed. openhab/openhab-core#4438 allows defining action id not depending on method name and as a consequence allows avoidding thing actions with the same id when the same method name is used.

Bindings to be fixed:

All bindings from a until m were checked

lolodomo commented 3 weeks ago

I realise that the id, when it is not the method name, should be mentioned in the documentation as this id is required to run the REST API (run the action).

Laith-Budairi commented 2 weeks ago

is there still a need to do the mqtt binding too?

lsiepel commented 2 weeks ago

is there still a need to do the mqtt binding too?

There is another PR in core that generates these id’s automatically. So this makes the live of contributors and maintainers a little easier as we do not need to care about the id in the bindings.

lolodomo commented 2 weeks ago

The need disappeared with the enhancement in progress in core framework. But the discussion in the core PR revealed another issue that should be fixed in bindings: you must not define several classes with the same action scope. I know for example caddx or freeboxos doing that. @J-N-K explained this constraint.

lolodomo commented 2 weeks ago

I am know closing th me issue as the core PR fixing the problem has been merged.