[Styling Module] Sub-button coloring based on entity state #1661
Replies: 5 comments 11 replies
-
great module. How can I add additional buttons 5, 6, 7... If I update yaml and just add "button 5:" it's not working. |
Beta Was this translation helpful? Give feedback.
-
Hi, is there a way to change the 'on' color for devices, like climate controls, that don't have a simple on/off state? |
Beta Was this translation helpful? Give feedback.
-
Hey, great module! I wanted to use this for my dashboard but I didn't just have on/off entities, I had a bunch more like cover current_position, my lock that reports locked/unlocked etc., so I added that option. Feel free to take a look and use it to update the module if you want to:
|
Beta Was this translation helpful? Give feedback.
-
Great module, thank you! 😄 sub_button_coloring:
name: "Sub-button coloring based on entity state"
version: "1.2"
creator: "LastBitOfCoffee"
link: "https://github.com/Clooos/Bubble-Card/discussions/XXXX"
supported:
- button
- separator
...etc...etc...
I have noticed that [JS+Editor Module] Conditional Subbutton Colors seems to work similarly and has the following support. So maybe support can be extended even further? unsupported:
- horizontal-buttons-stack
- pop-up
- empty-column Thank you in advance! |
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.
-
Sub-button coloring based on entity condition
Version: 1.4
Creator: LastBitOfCoffee
Important
Supported cards:
Breaking changes: This module offers 2 main features: Lets you change the icon and background color of a sub-button based on its entity's condition and support HVAC entity with multiple actions - each color for each mode cooling/heating/idle. Two features representated in 2 dropdown menus, choose non-HVAC for general entity or HVAC entity for climate entity. All four sub-buttons share the same OFF state colors for unity which you can also modify that.
Disclaimer: This is just a simple module I first created for personal use, I'm not much familiar with JS so please let me know if anything not working properly on your side. The major change (condition picking) got inspired by this module here: #1311 by HenryJIII, many thanks to the author of that module
Here is a hex color picking website that I like: https://www.schemecolor.com/
Changelog:
1.4 - Major breaking change: Using condition instead of previous entity's limited state, still add support for HVAC entity (This might revoke all color setup you had with previous releases +_+ so please only update if you're willing to re-copy those colors over, sorry about that)
1.3 - enabled support for separator
1.2 - added support for climate entity
1.1 - Increased default support to 25 sub-buttons.
1.0 - Initial release.
Configure this module via the editor or in YAML, for example:
You can add more sub-buttons under Optional: Editor schema (YAML) by copy and paste one block of code for the extra button (make sure to modify the number of the added sub-buttons, currently there are 4 only), example:
🧩 Get this Module
Screenshot:
Before posting your module
unsupported
propertyyour_module_key
Beta Was this translation helpful? Give feedback.
All reactions