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

input_datetime icon_color based on state #182

Open
Krocko opened this issue Mar 17, 2020 · 1 comment
Open

input_datetime icon_color based on state #182

Krocko opened this issue Mar 17, 2020 · 1 comment

Comments

@Krocko
Copy link

Krocko commented Mar 17, 2020

I want to change the color from an input_datetime if it is activ (the selected time is in the future).
Is this possible?

@a-x-
Copy link

a-x- commented Oct 30, 2020

looks like this:

 templates:
    icon: >
      if (state === 'on') return 'mdi:sleep';
      return 'mdi:sleep-off';
    icon_color: >
      if (state === 'on') return 'rgb(251, 210, 41)';
      return 'rgb(54, 95, 140)';

but it’s not work for me

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

No branches or pull requests

2 participants