mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Change color based on online status
This commit is contained in:
parent
4824268203
commit
cedff05684
@ -27,11 +27,18 @@
|
|||||||
ha-state-icon[data-domain=sun][data-state=above_horizon] {
|
ha-state-icon[data-domain=sun][data-state=above_horizon] {
|
||||||
color: #DCC91F;
|
color: #DCC91F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Color the icon if entity is offline */
|
||||||
|
ha-state-icon[data-domain=light][data-online=offline],
|
||||||
|
ha-state-icon[data-domain=switch][data-online=offline],
|
||||||
|
ha-state-icon[data-domain=binary_sensor][data-online=offline] {
|
||||||
|
color: #D3D3D3;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ha-state-icon id='icon' state-obj='[[stateObj]]'
|
<ha-state-icon id='icon' state-obj='[[stateObj]]'
|
||||||
data-domain$='[[stateObj.domain]]' data-state$='[[stateObj.state]]'>
|
data-domain$='[[stateObj.domain]]' data-state$='[[stateObj.state]]' data-online$='[[stateObj.online]]'>
|
||||||
</ha-state-icon>
|
</ha-state-icon>
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user