Update item_activity_history_line.yaml#5
Open
dapuzz wants to merge 1 commit intokloggy:masterfrom
dapuzz:patch-2
Open
Update item_activity_history_line.yaml#5dapuzz wants to merge 1 commit intokloggy:masterfrom dapuzz:patch-2
dapuzz wants to merge 1 commit intokloggy:masterfrom
dapuzz:patch-2
Conversation
undefined zone total time
kloggy
reviewed
Apr 8, 2020
Contributor
Author
|
I am not a js developer either :-D this just fix when you have less thatn 8 zones you get an "undefined" that breaks the script |
Contributor
Author
|
Oops,I deleted the commit by mistake. Junior user of github too! |
kloggy
reviewed
Apr 8, 2020
Owner
kloggy
left a comment
There was a problem hiding this comment.
Ah, I see...
Maybe you you have solved a problem I was also having which I solved by changing this section to include an else.
styles:
card:
- display:
[[[
var zone = '{{ zone }}';
zone = Number(zone.substring(4, 5));
var number_of_zones = Number(states['input_number.irrigation_number_of_zones'].state);
var show_history = states['input_boolean.irrigation_show_status_history'].state;
if (zone > number_of_zones ||
show_history == 'off' )
return 'none';
else return null;
]]]
But I too am junior with Github and I did it by editing the file directly.
Unless of course this is a different problem? But mine works with less than 8 zones.
I also added the else in item_activity_previous_line.yaml
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.
undefined zone total time