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

Update item_activity_history_line.yaml #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update item_activity_history_line.yaml #5

wants to merge 1 commit into from

Conversation

dapuzz
Copy link
Contributor

@dapuzz dapuzz commented Apr 7, 2020

undefined zone total time

undefined zone total time
Copy link
Owner

@kloggy kloggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for these changes. As I said in the readme I am not a Javascript programmer, I am learning as I go! How is your version better than mine? I don't doubt it, I just wondered?

@dapuzz
Copy link
Contributor Author

dapuzz commented Apr 8, 2020

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

@dapuzz dapuzz closed this Apr 8, 2020
@dapuzz
Copy link
Contributor Author

dapuzz commented Apr 8, 2020

Oops,I deleted the commit by mistake. Junior user of github too!

@dapuzz dapuzz reopened this Apr 8, 2020
Copy link
Owner

@kloggy kloggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

Successfully merging this pull request may close these issues.

2 participants