Error while announcing change in weather.home status

I am trying to get Alexa to announce whenever the weather.home status changes. I am getting the following error message from trace: Error: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘from_state’
I would appreciate any help in resolving this issue. Thank you.

My YAML code:
alias: Weather changes
description: Notify when the weather changes

  • platform: state
    entity_id: weather.home
  • condition: time
    after: ‘15:30:00’
    before: ‘23:30:00’
  • service: notify.alexa_media_show
    message: >-
    Hi there. I wanted to let you know that the weather conditions have
    changed from {{ trigger.from_state.state }} to {{ trigger.to_state.state
    }} The real feel temperature is
    type: tts
    mode: single

Are you testing the automation by manually triggering it? If you are then that’s why you are getting the error message. The trigger variable, in trigger.from_state.state, is undefined when the automation is manually triggered.

For more information, refer to:

Testing your automation

Thank you for your reply. I was testing the automation. I will let it run its course today.