The automation is currently only testing if HA can read these notifications. So when the 3rd party app sends notification, HA should notify me as well.
Though I’ve configured HA companion app sensor to allow reading of notifications, the traces shows no activity.
alias: Reolink notification
description: ""
trigger:
- platform: state
entity_id:
- sensor.gil_galaxy_s23_last_notification
attribute: android.subText
to: Camera Alert
condition: []
action:
- device_id: 473a09479b001acfd5c5bc87923bfcf5
domain: mobile_app
type: notify
message: you got notification from reolink
mode: single
alias: Reolink notification
description: ""
trigger:
- platform: state
entity_id:
- sensor.gil_galaxy_s23_last_notification
attribute: android.text
to: Person is detected from Entrance cam.
condition: []
action:
- device_id: 473a09479b001acfd5c5bc87923bfcf5
domain: mobile_app
type: notify
message: you got notification from reolink
title: HA Reolink
enabled: false
- service: notify.mobile_app_gil_galaxy_s23
data:
message: you got notification from reolink
title: HA Reolink
mode: single
And check if your mobile ist configured in HA. Goto Developer Tools->Services and search for “notify.mobile”. Does you mobile phone show up? Post a screen shot.
Based on the companion app, it seems I need to use android.bigText so I’ll try that.
alias: Reolink notification
description: ""
trigger:
- platform: state
entity_id:
- sensor.gil_galaxy_s23_last_notification
attribute: android.bigText
to: Person is detected from Entrance cam.
condition: []
action:
- device_id: 473a09479b001acfd5c5bc87923bfcf5
domain: mobile_app
type: notify
message: you got notification from reolink
title: HA Reolink
enabled: true
mode: single
Using the service call, I get this error from HA: The automation "Reolink notification" (automation.reolink_notification) has an action that calls an unknown service: notify.mobile_app_gil_galaxy_s23.
That is why I reverted back to the original automation configuration I posted.
Bingo. So that works. The question now is why you get an error calling the same service from within your automation. Try using double quotes for the text and make sure the indentations are exactly as shown.
description: ""
trigger:
- platform: state
entity_id:
- sensor.gil_galaxy_s23_last_notification
attribute: android.title
to: Camera Alert
condition: []
action:
- service: notify.mobile_app_gil_galaxy_s23
data:
message: you got notification from reolink
title: HA Reolink
mode: single
If there are no traces then your trigger does not work. I think you cannot trigger on the attribute of that sensor because it has none. Try this. Remove attribute: and to: lines. This should trigger on any state change.
trigger:
- platform: state
entity_id:
- sensor.gil_galaxy_s23_last_notification
I tried it. The sensor.xxx_last_notification state is the Title Text of the notification. So I sent an email with title Test3 to my mobile which triggered the automation. For me this works.