-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fronius] Thing actions: Return boolean & Annotate all inputs as required #17623
Conversation
florian-h05
commented
Oct 23, 2024
•
edited
Loading
edited
- Returns a boolean from all Thing actions indicating the action was executed successful or not.
- Annotates all action inputs as required.
…ailure Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
For information, look at #17504. |
Given the core code and the current docs, actions that return a single value don’t need @ActionOutput. This annotation is not read by core, it is currently totally useless. |
So IMHO this PR can be merged and @ActionOutput can still be added later. This PR is unrelated to @ActionOutput discussion. |
It is in the sense you are adding output to thing actions in this PR. |
@florian-h05 : I let you adjust as finally decided. |
As discussed in openhab#17504. Signed-off-by: Florian Hotze <[email protected]>
f69ad0f
to
b075b79
Compare
@lolodomo I have just added the |
} | ||
|
||
public void addHoldBatteryChargeSchedule(ZonedDateTime from, ZonedDateTime until) { | ||
addHoldBatteryChargeSchedule(from.toLocalTime(), until.toLocalTime()); | ||
public boolean addHoldBatteryChargeSchedule(ZonedDateTime from, ZonedDateTime until) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotations are missing for this action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is deliberately, I don’t need those overrides to show up in the UI or be available as rule module. These overrides solely exist to allow easier usage from scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unusual but ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure which binding it was but not annotation any existing override helps improving the UI experience.
} | ||
|
||
public void addForcedBatteryChargingSchedule(ZonedDateTime from, ZonedDateTime until, QuantityType<Power> power) { | ||
addForcedBatteryChargingSchedule(from.toLocalTime(), until.toLocalTime(), power); | ||
public boolean addForcedBatteryChargingSchedule(ZonedDateTime from, ZonedDateTime until, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotations are missing for this action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
…ired (openhab#17623) * [fronius] Symo Inverter actions: Return boolean to indicate success/failure * [fronius] Symo Inverter actions: Annotate all inputs as required * [fronius] Add `@ActionOutput` annotation As discussed in openhab#17504. Signed-off-by: Florian Hotze <[email protected]>