Feature/predefined actions with parameters - #220
Merged
Conversation
…ype of actions related to #173
Owner
Author
|
Documentation for this new feature is missing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves part of #173. It adds a new concept called Action types. They are similar to how actions/scripts are defined in HA. A full, but dummy config would be:
Now, we allow adding a list of actions with mixed types:
serviceandentity_idanddataare optional.action: <name of the action>Note that the actions will be executed sequentially and not in parallel, so if the actions are still being executed (such as waiting), and we fire them up again, the previous one will be cancelled and a new one will be executed. This is like the
mode: restartfrom HA automations.Keep in mind that if using predefined actions, it is not recommended to use a list of
holdactions since they will be executed sequentially, and it will not result in an expected behaviour.