Using tile cards for most of my sensor statuses, a few of them related to switch status (for lights) have this semi-transparent background behind the icon that I’d like to get rid of.
Is there a way to get rid of the circular green background behind the lightbulb icon? Code is exactly the same between these two tile cards, other than than one is associated with a “binary_sensor”, the other with a “switch” type entity.
For the garage door card:
- type: tile
entity: binary_sensor.door_garage_small_contact
state_content:
- state
- last_changed
icon: mdi:garage
name: Small Garage Door
card_mod:
style: |
ha-tile-icon {
{% if states('binary_sensor.door_garage_small_contact') == "off" -%}
--tile-color: lime;
{%- else -%}
--tile-color: red;
{%- endif -%};
}
For the light switch card:
- type: tile
entity: switch.garage_light_switch
state_content:
- state
- last_changed
icon: mdi:lightbulb
tap_action:
action: toggle
card_mod:
style: |
ha-tile-icon {
{% if states('switch.garage_light_switch') == "off" -%}
--tile-color: lime;
{%- else -%}
--tile-color: orange;
{%- endif -%};
}