hey all,
i have recently got a 3d printer and hooked it up to home assistant and have been using some pre made templates to create a dashboard,
i have added a " workshop ceiling light " button entity but i wish to have it use clear colours when the light is on and off (green on and red off) but i am unsure how to edit the template to help me with this
here is the yaml
type: picture-elements
elements:
- type: conditional
conditions:
- entity: sensor.bambu_a1_printer_print_status
state_not: offline
elements:
- entity: light.bambu_a1_printer_chamber_light
type: state-icon
style:
top: 45%
left: 89%
"--mdc-icon-size": 2.6em
tap_action:
action: toggle
- entity: light.workshop_ceiling_light
type: state-icon
style:
top: 60%
left: 89%
"--mdc-icon-size": 2.6em
tap_action:
action: toggle
- entity: sensor.bambu_a1_printer_print_status
type: state-label
style:
top: 82.5%
left: 78.8%
font-size: 0.75em
color: "#FFFFFF"
- type: conditional
conditions:
- entity: image.bambu_a1_printer_cover_image
state_not: unavailable
elements:
- type: custom:hui-element
card_type: picture-entity
show_name: false
show_state: false
entity: image.bambu_a1_printer_cover_image
style:
top: 61.5%
left: 47%
transform: translate(-45%, -40%) scale(75%, 75%)
"--ha-card-border-width": 0px
"--ha-card-background": none
- entity: sensor.bambu_a1_printer_print_progress
type: state-badge
tap_action:
action: none
style:
top: 18.5%
left: 74%
font-size: 1em
color: rgba(0,0,0,0)
"--label-badge-red": "#11739D"
- entity: sensor.bambu_a1_printer_nozzle_temperature
type: state-badge
style:
top: 35%
left: 46.5%
font-size: 0.8em
color: rgba(0,0,0,0)
- entity: sensor.bambu_a1_printer_bed_temperature
type: state-badge
style:
top: 95%
left: 46.5%
font-size: 0.8em
color: rgba(0,0,0,0)
card_mod:
style: null
image: /local/media/bambuprinter/a1_lightoff.png
entity: light.bambu_a1_printer_chamber_light
state_image:
unavailable: /local/media/bambuprinter/a1_lightoff.png
"on": /local/media/bambuprinter/a1_lighton.png
"off": /local/media/bambuprinter/a1_lightoff.png
any help is appreciated