Jiran
(Jiran)
November 15, 2017, 10:09am
1
Hello. I have alarm.dash:
alarm:
widget_type: alarm
entity: alarm_control_panel.alarm
title: Alarm
state_map:
“disarmed”: UNLOCKED
“armed_home”: HOUSE-LOCKED
“armed_away”: BACKYARD-LOCKED
“pending”: WARNING
“triggered”: .::ALARM::.
I would like to change widget background or whole dashboard background to red if alarm turns to “triggered” state. It would be great if it could blink but red color is enough. How to do it?
1 Like
thats also something you need to create a custom widget for or change something in the code.
you need to manipulate the JS code for that.
aimc
(Andrew Cockburn)
November 15, 2017, 4:29pm
3
There is an outstanding PR to allow widget states to change background color - I’ll be mergin it in at some point.
2 Likes
phairplay
(Phairplay)
November 30, 2017, 6:55pm
4
I would like to see this too for monitoring my qnap which states Good or Bad
3vasi0n
(Joseph Sanders)
March 29, 2018, 3:49am
5
Did this ever get released? I would love to be able to change the color of the alarm button depending on what state the alarm is in.
kabturek
(Marcin Domański)
March 29, 2018, 8:54am
6
needs rebase - https://github.com/home-assistant/appdaemon/pull/159
maybe it could be more generic depending on the state map ?
widget_state_style_map:
"on": "background-color: red"
"off": $background_style
1 Like
3vasi0n
(Joseph Sanders)
March 29, 2018, 8:58am
7
lol yeah the rebase is a little out of my skill zone. I’ll try the generic approach and see if it works though.
Thank you.
kabturek
(Marcin Domański)
March 29, 2018, 9:27am
8
would love to test the generic approach if you make it work (shouldn’t be too hard to implement - if you don’t ill do it) as it would be great for an input_select
1 Like
aimc
(Andrew Cockburn)
March 29, 2018, 1:32pm
9
I’m intending to add this but I will probably take a different approach to that PR.
1 Like