#Announcement based on calendar entry

1 messages · Page 1 of 1 (latest)

vagrant mica
#

Hello, I'm trying to get an announcement to be made on my echos to remind us when we should be leaving for work, depending on traffic, and how early we want to arrive.

I've got this so dar, but it doesnt seem to making the announcements. I think the logic is correct, but for the life of me I cannot figure out what i've done wrong. to be fair, quite a bit of this has been assisted by a code AI, but i seem to be going round in circles.

Thanks in advance.

https://deletebin.org/s#53pd1mTvKy6FD7pYatMyrJ:8SeqpOzixiTZDvnxIZvcKbuN

worn trench
vagrant mica
#

i'm just not good enough at coding to try and get the logic.

This is what i'm trying to acheive.

Parses the next 5 sensor.ical_family_calendar_event_* sensors.

Filters for events with "Karl - Work", "Mandy - Work", or "Kajay - Work".
Looks up each person's commute time and early arrival offset.
Calculates the correct announcement time:
start time - commute - early
Announces via Alexa 10 minutes before that.

worn trench
#

I've created a test automations

description: ""
triggers:
  - trigger: state
    entity_id:
      - calendar.calendario_prueba
    attribute: start_time
conditions: []
actions:
  - action: notify.mobile_xxxx
    metadata: {}
    data:
      message: Mensaje de prueba por inicio
      title: Título del mensaje de inicio
mode: single
#

I think the point here is to manipulate "start_time" to substract the time you need

#

I've created the automation from the front of the app
, avoid the yaml if it's not necessary 🙂

#

I've been looking in the Discord channel and there must be a way to subtract 10 minutes or whatever you want from the start time

#

Meanwhile, I'll try creating the calendar with the exact time you want the alarm to sound

#

This is a solution for the first part of your automation

#

I don't use Alexa so I can't help you in that part 😅

vagrant mica
#

I think i've got somewhere. I'll add my code in just a minute.

#

Thank you.

worn trench