Separate collection reminder

Hi, since “Garbage Collection” no longer works, my automation for the separate “garbage collection” reminder has stopped working, I’ll list my automation and kindly if anyone can tell me how to make it work

alias: "Notifica ritiro spazzatura"
variables:
  sensors:
    - sensor.plastica
    - sensor.carta
    - sensor.umido
    - sensor.indifferenziata
    - sensor.vetro
  zero_day: >
     {{ expand(sensors) | selectattr('attributes.days', 'eq' , 0)
       | map(attribute='name') | list }}
trigger:
  - platform: time
    at: '20:30:00'
condition:
  - condition: template
    value_template: "{{ zero_day | count > 0 }}"
action:
  - variables:
      names: "{{ zero_day | join(', ') }}"
  - service: notify.mobile_app_iphone
    data:
      message: "Attenzione: domani è giorno di ritiro frazione {{ names }}."
  - service: notify.alexa_media_alexa_cucina
    data:
      message: "Attenzione: domani è giorno di ritiro frazione {{ names }}."
      target: media_player.alexa
      data:
        type: tts

is there anything else to change?

  alias: Notifica ritiro spazzatura
  variables:
    sensors:
    - calendar.carta
    - calendar.plastica
    - calendar.umido
    - calendar.indifferenziata
    - calendar.vetro
    zero_day: "{{ expand(sensors) | selectattr('attributes.days', 'eq' , 0)\n  | map(attribute='name')
      | list }}\n"
  trigger:
  - platform: time
    at: '20:45:00'
  condition:
  - condition: template
    value_template: '{{ zero_day | count > 0 }}'
  action:
  - variables:
      names: '{{ zero_day | join('', '') }}'
  - service: notify.mobile_app_iphone_8_ugo
    data:
      message: "Attenzione\U0001F6A9: domani è giorno di ritiro frazione {{ names
        }}."
      title: Domotica
  - service: notify.alexa_media_alexa_cucina
    data:
      message: <say-as interpret-as="interjection"> ta dà <break time="1s"/> <emphasis level="reduced">c'è da scendere
        {{ names }}</emphasis></say-as>
      target: media_player.alexa
      data:
        type: tts

Your existing automation was designed to work with the sensor entities created by the Garbage Collection integration. It isn’t designed to work with calendar entities so you can’t simply replace all of the automation’s references to sensors with calendars.

Your automation will need to be redesigned to use Calendar Triggers. Someone else will have to help you with this because I don’t currently have available time to build it for you. As a starting point, use tom_l’s example (in the first link posted above). Good luck.

ok thanks…

so after a bit of study…to understand something, I managed to replace “garbage collection” with calendar events to be able to manage waste separation, everything works on homeassistant, ok but now I would like to let Alexa speak, I have I created this automation but it doesn’t work, can you please help me solve it?

- id: '1'
  alias: 'Avviso Rifiuto Giorno Prima'
  trigger:
    - platform: state
      entity_id: sensor.date
      to: "{{ now().strftime('%Y-%m-%d') }}"
    - platform: event
      event_type: 'calendar.event_start'
  condition:
    - condition: template
      value_template: "{{ trigger.event.data.description | regex_match('Plastica|Carta|Umido|Secco_residuo|Vetro') }}"
    - condition: time
      before: '12:53:00'  # Cambia l'ora in base alla tua preferenza
  action:
    - service: notify.alexa_alexa_cucina
      data_template:
        message: "Domani, alle {{ states('sensor.time') }}, ricordati di portare fuori il rifiuto {{ trigger.event.data.description | regex_findall_index('Plastica|Carta|Umido|Secco_residuo|Vetro') }}"

following this video https://www.youtube.com/watch?v=RpwAhy7f52I