Merge pull request #34 from w1ll1am23/display_offline
Display a different entity icon if device is unavailable
This commit is contained in:
commit
8187b8d964
|
@ -59,7 +59,8 @@ export default new Polymer({
|
|||
|
||||
computeIsOn(stateObj) {
|
||||
return stateObj && stateObj.state !== 'off' &&
|
||||
stateObj.state !== 'unlocked' && stateObj.state !== 'closed';
|
||||
stateObj.state !== 'unlocked' && stateObj.state !== 'closed' &&
|
||||
stateObj.state !== 'unavailable';
|
||||
},
|
||||
|
||||
// We call updateToggle after a successful call to re-sync the toggle
|
||||
|
|
|
@ -27,6 +27,14 @@
|
|||
ha-state-icon[data-domain=sun][data-state=above_horizon] {
|
||||
color: #DCC91F;
|
||||
}
|
||||
|
||||
/* Color the icon if unavailable */
|
||||
ha-state-icon[data-domain=light][data-state=unavailable],
|
||||
ha-state-icon[data-domain=switch][data-state=unavailable],
|
||||
ha-state-icon[data-domain=binary_sensor][data-state=unavailable],
|
||||
ha-state-icon[data-domain=sensor][data-state=unavailable] {
|
||||
color: #D3D3D3;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue