Hallo,
ich versuche in meiner Müllkarte eine weitere Zeile unter der letzten (in…Tagen) einzufügen und zwar das Datum der jeweilen nächsten Abholung.
So sieht die Karte bisher aus:
Das Datum zum Beispiel der nächsten grünen Abholung erhalte ich mit:
{{ states.sensor.abfallgruenermuell.attributes | first | as_timestamp |timestamp_custom("%d.%m.%y") }}
Der Code der ganzen Müllkarte lautet:
type: picture-elements
image: /local/muell/Back_trans.png
elements:
- type: custom:button-card
entity: sensor.mullabholung_text_morgen
show_icon: false
show_name: false
show_state: true
style:
top: 10%
left: 50%
width: 100%
styles:
state:
- font-size: 1vw
- font-family: Arial Rounded MT
- color: var(--primary-color)
- white-space: unset
- text-overflow: unset
- word-break: break-word
card:
- background: transparent
- border: none
- type: custom:button-card
entity: sensor.grau
show_entity_picture: true
entity_picture: /local/muell/schwarz.png
show_state: false
show_name: false
aspect_ratio: 2/3
size: 100%
styles:
card:
- border: none
- background: transparent
state:
- value: Morgen
entity_picture: /local/muell/schwarz.png
styles:
entity_picture:
- animation:
- blink 1s linear infinite
style:
pointer-events: none
left: 15%
top: 45%
width: 20%
- type: custom:button-card
entity: sensor.papier
show_entity_picture: true
entity_picture: /local/muell/blau.png
show_state: false
show_name: false
aspect_ratio: 2/3
size: 100%
styles:
card:
- border: none
- background: transparent
state:
- value: Morgen
entity_picture: /local/muell/blau.png
styles:
entity_picture:
- animation:
- blink 1s linear infinite
style:
pointer-events: none
left: 38%
top: 45%
width: 20%
- type: custom:button-card
entity: sensor.bio
show_entity_picture: true
entity_picture: /local/muell/braun.png
show_state: false
show_name: false
aspect_ratio: 2/3
size: 100%
styles:
card:
- border: none
- background: transparent
state:
- value: Morgen
entity_picture: /local/muell/braun.png
styles:
entity_picture:
- animation:
- blink 1s linear infinite
style:
pointer-events: none
left: 61%
top: 45%
width: 20%
- type: custom:button-card
entity: sensor.grun
show_entity_picture: true
entity_picture: /local/muell/gruen.png
show_state: false
show_name: false
aspect_ratio: 2/3
size: 100%
styles:
card:
- border: none
- background: transparent
state:
- value: Morgen
entity_picture: /local/muell/gruen.png
styles:
entity_picture:
- animation:
- blink 1s linear infinite
style:
pointer-events: none
left: 84%
top: 45%
width: 20%
- type: custom:button-card
entity: sensor.grau
show_name: true
show_icon: false
show_state: true
style:
top: 85%
left: 15%
width: 25%
styles:
name:
- font-size: 0,9vw
- font-family: Arial Rounded MT
- color: var(--primary-color)
state:
- font-size: 0,8vw
- font-family: Arial Rounded MT
- padding-top: 0.3em
card:
- background-color: transparent
- border: none
- type: custom:button-card
entity: sensor.papier
show_name: true
show_icon: false
show_state: true
style:
top: 85%
left: 38%
width: 25%
styles:
name:
- font-size: 0,9vw
- font-family: Arial Rounded MT
- color: var(--primary-color)
state:
- font-size: 0,8vw
- font-family: Arial Rounded MT
- padding-top: 0.3em
card:
- background-color: transparent
- border: none
- type: custom:button-card
entity: sensor.bio
show_name: true
show_icon: false
show_state: true
style:
top: 85%
left: 61%
width: 25%
styles:
name:
- font-size: 0,9vw
- font-family: Arial Rounded MT
- color: var(--primary-color)
state:
- font-size: 0,8vw
- font-family: Arial Rounded MT
- padding-top: 0.3em
card:
- background-color: transparent
- border: none
- type: custom:button-card
entity: sensor.grun
show_name: true
show_icon: false
show_state: true
style:
top: 85%
left: 84%
width: 25%
styles:
name:
- font-size: 0,9vw
- font-family: Arial Rounded MT
- color: var(--primary-color)
state:
- font-size: 0,8vw
- font-family: Arial Rounded MT
- padding-top: 0.3em
card:
- background-color: transparent
- border: none
- type: action-button
style:
left: 50%
top: 50%
action: input_button.press
title: Müllerinnerung
data: {}
target:
entity_id: input_button.mullerinnerung_button
Wie in aller Welt bekomme ich jetzt die Zeile mit den jeweiligen Datum darunter?