=========================== Example 1: Auto-entities with background pictures =========================== type: custom:auto-entities card: square: false type: grid columns: 4 card_param: cards filter: include: - entity_id: sensor.affalddk_* state: < 34 options: type: custom:button-card layout: horizontal state_display: | [[[ var d=entity.state; if (d==0) {return "I dag"} if (d==1) {return "I morgen"} if (d>1) {return d+" dage"} ]]] name: | [[[ return entity.attributes.name; ]]] styles: grid: - grid-template-areas: "\"s\" \"l\" \"n\"" - grid-template-columns: 1fr - grid-template-rows: 1fr 10fr 1fr state: - background-color: rgba(0, 0,0, 0.3) - width: 100% - line-height: 50px - text-align: center - font-size: 22pt - color: white - display: inline-block - vertical-align: center name: - background-color: rgba(0, 0,0, 0.3) - padding-left: 0px - width: 100% - line-height: 50px - text-align: center - font-size: 14pt - color: white - display: inline-block - vertical-align: top card: - background-size: cover - background-position: center - background-image: | [[[ var txt=entity.attributes.entity_picture; return "url(" + txt + ")"; ]]] tap_action: action: more-info show_entity_picture: false show_state: true show_name: true show_image: false show_label: false show_icon: false aspect_ratio: 1/1 exclude: - entity_id: sensor.affalddk_*_naeste_afhentning - entity_id: sensor.*tekstil* sort: method: state numeric: true =========================== Example 2: Single card with entity pictures =========================== type: custom:button-card entity: sensor.affalddk_street_pap layout: icon_name_state2nd name: | [[[ return entity.attributes.name; ]]] label: | [[[ var d=entity.state; if (d==0) {return "I dag"} if (d==1) {return "I morgen"} if (d>1) {return ""+d+" dage"} ]]] styles: name: - justify-self: start - font-size: 14pt - padding-top: 10px label: - justify-self: start - font-size: 20pt - font-weight: 470 card: - background-color: rgba(3, 169, 244, 0.2) tap_action: action: more-info show_state: false show_name: true show_image: false show_label: true show_icon: true show_entity_picture: true