Hallo,
ich habe eine Müll Abfuhrkarte. Ich würde gerne die Icons von Restmüll in Grün, Gelbersack in Gelb und Altpapier in Blau haben.
Meine versuche einen State zu eröffnen und die Color zu definieren haben leider kein erfolg gebracht. Kann mir jemand helfen?
Grüße !
type: entities
style: |
ha-card {
opacity: 80%
}
entities:
- entity: sensor.restmull_grune_woche
style: |
:host {
color: grey
}
icon: mdi:delete-empty
show_state: true
type: custom:multiple-entity-row
name: Restmüll
secondary_info: false
entities:
- entity: sensor.restmull_grune_wochell_grune_wochell_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.restmull_date
name: Datum
- entity: sensor.gelber_sack
style: |
:host {
color: yellow
}
icon: mdi:recycle
show_state: true
type: custom:multiple-entity-row
name: Gelber Sack
secondary_info: false
entities:
- entity: sensor.gelber_sack_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.gelber_sack_date
name: Datum
- entity: sensor.altpapier
style: |
:host {
color: deepskyblue
}
icon: mdi:package-variant
show_state: true
type: custom:multiple-entity-row
name: Altpapier
secondary_info: false
entities:
- entity: sensor.altpapier_collection
name: Abholung in
unit: Tage(n)
- entity: sensor.altpapier_date
name: Datum
- entity: sensor.mybuttoncardsensor
type: custom:button-card
layout: icon_name_state2nd
show_label: true
label: |
[[[
var days_to = entity.state.split("|")[1]
if (days_to == 0)
{ return "Heute" }
else if (days_to == 1)
{ return "Morgen" }
else
{ return " Abholung in " + days_to + " Tagen" }
]]]
show_name: true
name: |
[[[
return entity.state.split("|")[0]
]]]
state:
- color: red
operator: template
value: '[[[ return entity.state.split("|")[1] == 0 ]]]'
- color: orange
operator: template
value: '[[[ return entity.state.split("|")[1] == 1 ]]]'
- value: default
show_header_toggle: true
title: 'Termine :'
state_color: true
