I have put together a little screen to collect all my google calendars and present a screen of what’s coming up next. Here’s a snippet:
- type: entities
title: Seascape 1213
entities:
- type: entity
icon: mdi:information-outline
entity: sensor.1213_event_message
- type: entity
icon: mdi:calendar
entity: sensor.1213_event_begin
- type: entity
icon: mdi:calendar
entity: sensor.1213_event_end
- type: entity
icon: mdi:map-marker-radius
entity: sensor.1213_event_location
- type: entity
icon: mdi:information-outline
entity: sensor.1213_event_description
The entities came from the following sensor templates:
1213_event_message:
value_template: "{{ states.calendar['1213'].attributes.message }}"
friendly_name: "Next Event"
1213_event_all_day:
value_template: "{{ states.calendar['1213'].attributes.all_day }}"
friendly_name: "All Day?"
1213_event_begin:
value_template: "{{ as_timestamp(states.calendar['1213'].attributes.start_time) | timestamp_custom('%a, %b %d at %r') }}"
friendly_name: "Begin"
1213_event_end:
value_template: "{{ as_timestamp(states.calendar['1213'].attributes.end_time) | timestamp_custom('%a, %b %d at %r') }}"
friendly_name: "End"
1213_event_location:
value_template: "{{ states.calendar['1213'].attributes.location }}"
friendly_name: "Location"
1213_event_description:
value_template: "{{ states.calendar['1213'].attributes.description }}"
friendly_name: "Description"
I have a half dozen of these cards displayed. What I would like to do is turn the background color of a card green if the event_begin date is today.
I’ve killed too many brain cells on this and assistance is appreciated.