Trying to get an automation to turn on a boolean when it detects that a certain phrase has been sent as a notification to my phone. I’ve looked around and there’s value templates and regex statements but having trouble understanding/adapting it to suit my needs. Here’s what I have so far:
alias: Order Confirmed
description: ""
trigger:
- platform: state
entity_id:
- sensor.phone_last_notification
to: has been confirmed
condition: []
action:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.order_confirmed
mode: single
Which of course only works if the exact phrase ‘has been confirmed’ is the whole notification. But there’s some variables before and after that I want to ignore.
Help is much appreciated, thanks!