Automation for change of state

Is there a way to trigger an automation for a change of state instead of on\off or open\closed? For example, I have two automations one that triggers a notification when the garage door opens and another when it closes. Is it possible to combine them into one automation for when the state changes?

Thanks,

Yes. A state trigger with no to: or for: triggers on every state change. You can then use templating to control what happens depending on the state.

It is more complicated that way, but it’s certainly possible.

Makes sense. I thought the the to: or for: were required. I’ll have to play around with it.