Create Template Sensor from Google Calendar Event

Sorry in advance for being terrible at templates. Maybe I am overthinking how to do this, but all I want to do is create a template binary sensor for specific calendar events. The template below is returning false, despite it being true (all day event)

- platform: template
  sensors:
    vanessa_day_off:
      friendly_name: Vanessa Day Off
      value_template: >-
        {% if state_attr('calendar.mygooglecalendar.message', 'Day off') %}
          true
        {% else %}
          false
        {% endif %}
1 Like

I figured it out!
I had to use is_state_attr, look for the attribute I wanted (in this case ‘message’, and then check to see if that attribute is a certain value (in this case ‘Day off’).

- platform: template
  sensors:
    vanessa_day_off:
      friendly_name: Vanessa Day Off
      unique_id: vanessa_day_off
      value_template: >-
        {% if is_state_attr('calendar.mygooglecalendar', 'message', "Day off") %}
          true
        {% else %}
          false
        {% endif %}