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

Replace config actions with Thing actions #17992

Open
4 tasks
florian-h05 opened this issue Dec 28, 2024 · 2 comments
Open
4 tasks

Replace config actions with Thing actions #17992

florian-h05 opened this issue Dec 28, 2024 · 2 comments

Comments

@florian-h05
Copy link
Contributor

florian-h05 commented Dec 28, 2024

With UI support for Thing actions in openHAB 4.3, I would like to get rid of the config actions, which have a high code complexity in the UI and as the issues with Z-Wave's config actions have shown, are prone to bugs.
Bindings should implement Thing actions instead of using this hacky approach-

The following search query gives an overview of the remaining config actions:
https://github.com/search?q=org%3Aopenhab+name%3D%22actions%22+language%3AXML&type=code&l=XML

Affected bindings are:

  • Konnected
  • Max
  • MQTT HomeAssistant
  • Z-Wave

Pinging @openhab/add-ons-maintainers and @openhab/z-wave-maintainers, as well as @ccutrer for MQTT HomeAssistant.

@florian-h05 florian-h05 pinned this issue Dec 28, 2024
@ccutrer
Copy link
Contributor

ccutrer commented Dec 28, 2024

:nod:. For Home Assistant, it's the Update component. I've been meaning to figure out Thing actions anyway so I can add the Siren component, which doesn't clearly map to any channel since it almost always take additional parameters to the "trigger" action.

@ccutrer
Copy link
Contributor

ccutrer commented Feb 7, 2025

So I started work on this, but have run into the problem that the BaseThingHandlerFactory registers ThingHandlerServices immediately after the ThingHandler has been created, but before the ThingHandler has been initialized. I want to expose actions dynamically for the highly dynamic things that MQTT Home Assistant manages, depending on if it has an Update component or not (and in the future, other specific component types that I want to create actions for). @openhab/core-maintainers: would you be opposed to adding a method to BaseThingHandlerFactory to dynamically register new services for a ThingHandler at any time (when the ThingHandler has detected that a service is relevant)?

ccutrer added a commit to ccutrer/openhab-addons that referenced this issue Feb 7, 2025
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

No branches or pull requests

2 participants