Automation - State Condition display 'for:' in frontend#8124
Merged
bramkragten merged 2 commits intohome-assistant:devfrom Jan 11, 2021
Nikfinn99:state-condition-for
Merged
Automation - State Condition display 'for:' in frontend#8124bramkragten merged 2 commits intohome-assistant:devfrom Nikfinn99:state-condition-for
bramkragten merged 2 commits intohome-assistant:devfrom
Nikfinn99:state-condition-for
Conversation
Contributor
|
Hi @Nikfinn99, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
bramkragten
reviewed
Jan 11, 2021
| let trgFor = this.condition.for; | ||
|
|
||
| if ( | ||
| trgFor && |
Member
There was a problem hiding this comment.
Let give this variable a logical name, like for
Contributor
There was a problem hiding this comment.
Maybe not exactly that, but something better, yes.
forTime?
Contributor
Author
There was a problem hiding this comment.
I agree and the variable is now renamed
bramkragten
approved these changes
Jan 11, 2021
Member
|
Thanks! 🦁 |
Contributor
|
🎉 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Breaking change
Proposed change
The state-condition, is missing the
for:configuration entry in UI mode, which can only be configured from the yaml mode.The
for:configuration is documented here (see first example):https://www.home-assistant.io/docs/scripts/conditions/#state-condition
Old UI
Change from this PR
YAML mode
Type of change
Example configuration
Add this to an automation and then switch to the UI mode.
In the latest release of home-assistant, the
for:option will be missing from UI.Additional information
I created a feature request in the community forum first (see link below).
As i created a couple of webpages in the past also with Angular and Vue, i've decided to look into this issue myself and found the solution to be really easy, as all of the code was already present for the state trigger.
Checklist
If user exposed functionality or configuration variables are added/changed: