I googled and found a lot of helpful articles but unfortunately none of them worked. I made my garage door work by using a zigbee relay that triggers a remote control. I then created a template cover in the configuration.yaml file. It shows up in my UI card and everything works. I can open and close the garage doors with no issue. I want to change the color of the icon when the door is open. When closed, it’s blue (which is fine), when it’s open, it’s purple. I want to change it to red. How do I do it? I googled and tried all different ways and nothing works. I also found an article where you can change it in the default theme file (I think it’s called ha-style.ts), but where is that? I’m not new to Home Assistant, but I feel like I get things working, and when I need to modify something, i forget a lot of what I previously learned. This shouldn’t be that hard to do. So here is my configuration.yaml file. This is the latest thing i tried.
frontend:
themes:
my_theme:
state-cover-garage-open-color: "#ff0000"
Supposedly it overrides the default theme and changes the color of the cover entities.
I looked at this thread:
and tried a bunch of stuff listed in there as well
configuration.yaml:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensor.yaml
binary_sensor: !include binary_sensor.yaml
notify: !include notify.yaml
#discovery:
homeassistant:
customize: !include customize.yaml
packages: !include_dir_named packages
frontend:
themes:
my_theme:
state-cover-garage-open-color: "#ff0000"
input_number:
weatheralerts_notify_timeout:
name: Weather Alerts Notify Timeout
mode: slider
initial: 900
min: 60
max: 3600
step: 60
icon: mdi:timer
unit_of_measurement: "seconds"
command_line:
- sensor:
name: CPU Temp
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(2) }}'
cover:
- platform: template
covers:
dave_garage_door:
device_class: garage
friendly_name: "Dave's Garage Door"
value_template: "{{ is_state('binary_sensor.daves_overhead_sensor_state', 'on') }}"
open_cover:
- condition: state
entity_id: binary_sensor.daves_overhead_sensor_state
state: "off"
- action: light.turn_on
target:
entity_id: light.attached_garage_daves_side
close_cover:
- condition: state
entity_id: binary_sensor.daves_overhead_sensor_state
state: "on"
- action: light.turn_on
target:
entity_id: light.attached_garage_daves_side
icon_template: "{% if not is_state('binary_sensor.daves_overhead_sensor_state', 'off') %}mdi:garage-open{% else %}mdi:garage{% endif %}"
- platform: template
covers:
katie_garage_door:
device_class: garage
friendly_name: "Katie's Garage Door"
value_template: "{{ is_state('binary_sensor.katie_overhead_door', 'on') }}"
open_cover:
- condition: state
entity_id: binary_sensor.katie_overhead_door
state: "off"
- action: light.turn_on
target:
entity_id: light.attached_garage_katies_side
close_cover:
- condition: state
entity_id: binary_sensor.katie_overhead_door
state: "on"
- action: light.turn_on
target:
entity_id: light.attached_garage_katies_side
icon_template: "{% if not is_state('binary_sensor.katie_overhead_door', 'off') %}mdi:garage-open{% else %}mdi:garage{% endif %}"