so i have custom card colors 3 colors
on off and unavailable
im using TPlink switchs and plugs
im finding it will change Blue for Else as long as the device is on or off but not unavailable…
now if i have a device thats unavaliable its supposed to turn Blue… but it doesnt it defaults to green.
but it will work if i change off to offf and then it turns blue… if its detectable…
is there something else i need to configure… or is it a bug or a glitch or something
my card code is
type: entities
entities:
- entity: sensor.b_modem_state
name: Modem State
icon: 'mdi:laptop'
options: null
style: |
:host {
--paper-item-icon-color:
{% if states(config.entity) == 'on' %}
yellow
{% elif states(config.entity) == 'offf' %}
green
{% else %}
blue
{% endif %}
;
}
- entity: sensor.h_hot_water_tank_state
name: House Hot Water Tank
icon: 'mdi:water'
options: null
style: |
:host {
--paper-item-icon-color:
{% if states(config.entity) == 'on' %}
yellow
{% elif states(config.entity) == 'off' %}
green
{% else %}
blue
{% endif %}
;
}
- entity: sensor.h_hot_water_tank_state
name: House Hot Water Tank
icon: 'mdi:water'
options: null
style: |
:host {
--paper-item-icon-color:
{% if states(config.entity) == 'on' %}
yellow
{% elif states(config.entity) == 'offf' %}
green
{% else %}
blue
{% endif %}
;
}
- entity: sensor.b_outdoor_plug1_state
name: outdoor plug 1
icon: 'mdi:water'
options: null
style: |
:host {
--paper-item-icon-color:
{% if states(config.entity) == 'on' %}
yellow
{% elif states(config.entity) == 'off' %}
red
{% else %}
blue
{% endif %}
;
}
- entity: sensor.b_outdoor_plug2_state
name: outdoor plug 2
icon: 'mdi:water'
options: null
style: |
:host {
--paper-item-icon-color:
{% if states(config.entity) == 'on' %}
yellow
{% elif states(config.entity) == 'offf' %}
red
{% else %}
blue
{% endif %}
;
}
- entity: sensor.h_sauna_pump_state
name: Sauna Pump state
icon: 'mdi:water'
options: null
style: |
:host {
--paper-item-icon-color:
{% if states(config.entity) == 'on' %}
yellow
{% elif states(config.entity) == 'offf' %}
red
{% else %}
blue
{% endif %}
;
}
theme: christmas
title: Status
state_color: false
show_header_toggle: false
my sensor.yaml is
h_sauna_pump_state:
friendly_name: "Sauna Pump Status"
value_template: "{{ states('switch.h_sauna_pump') }}"
b_outdoor_plug1_state:
friendly_name: "Plug1 Status"
value_template: "{{ states('switch.outdoor_plug_1') }}"
b_outdoor_plug2_state:
friendly_name: "Plug2 Status"
value_template: "{{ states('switch.outdoor_plug_2') }}"
h_hot_water_tank_state:
friendly_name: "House Hot Water Tank Status"
value_template: "{{ states('switch.h_hot_water_tank_switch') }}"
########################
### Modem Power Plug ###
########################
b_modem_state:
friendly_name: "Modem"
value_template: "{{ states('switch.b_building_light') }}"
so not sure what else i need to add or look for… if there is a doc’s i need to read please send me to the right docs to figure the issue