Set location based on Calendar

Hi All,

I’m hoping to get some help.

On my dashboard I’ve created a grid card with three columns. I’ve added myself, my wife and my daughter up using picture entity cards within. I’m showing my wife’s and my location based on our phones of course. My daughter doesn’t carry any device (she’s only 5). So my idea was to integrate her Google Calendar (done) to HA and then set up events for School and other appointments. When there is no event I want to show her as being Home. When I use the calendar entity and toggle on Show State it just shows me On or Off. How can I get this to work? Maybe with a Text Helper somehow and then using an Automation to change the text based on the calendar? I’m stuck here.

Thanks in advance.

You’ll need to use a template sensor or virtual device tracker.

The specifics really depend on how you have the calendar set up, but here’s a very basic example of how a template sensor could be used:

template:
  - trigger:
      - platform: calendar
        event: end
        entity_id: calendar.example
      - platform: calendar
        event: start
        entity_id: calendar.example
    sensor:
      - name: Child's Location Calendar Based
        state: |
          {{ trigger.calendar_event.summary if trigger.event == 'start' else 'Home' }}