[JS+Editor Module] Conditional state button coloring #1693
Replies: 7 comments 27 replies
-
ChangelogVersion 1.3
Version 1.2
Version 1.1
|
Beta Was this translation helpful? Give feedback.
-
So, having previously used the conditional background color module I thought I'd better change over to the this module, however, it just doesn't appear to function for me at all. I'm just trying to set the conditional background colour, see the code below. It doesn't seem to colour the background regardless of the condition. Is this just me?
|
Beta Was this translation helpful? Give feedback.
-
Thanks, works great for me, I am now able to put a specific background AND text color given the situation. I'm happy 👍 |
Beta Was this translation helpful? Give feedback.
-
Hi, is there any way to set multiple conditional colours? For example, I want to change an aircon state to be orange when on heat, blue when on cool, green when on fan, etc. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Great Module! what would be awesome is if there was a way to make it work with slider button as well? ie - I have some soil moisture sensors displayed with the sliding display and if it could change color based on how dry the entity is that would be amazing! it works great with standard button but slider as well would be so good |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Conditional state button coloring
Version: v1.3
Creator: andarotajo
Important
Supported cards:
Unsupported cards:
This module allows you to change various colors (and optionally opacity) of a state button based on more or more conditions. The settings can be applied to the card itself or the icon. Generally, it has the following features:
It's possible to set up multiple sets of conditions using the YAML configuration. To do this, copy the
conditional_colors_1
section replace the number at the end with the next number in sequence.Configure this module via the editor or in YAML, for example:
🧩 Get this Module
Screenshot:
Before posting your module
unsupported
propertyyour_module_key
Beta Was this translation helpful? Give feedback.
All reactions