Is this still an issue in 1.7? Did you try to set ttl: 0
and priority: high
?
Another OnePlus user here (OnePlus 6) confirming that notifications work much better when priority: high and ttl: 0 are set.
Loving the new update and just modified a bunch of my automations to include actionable notifications!
I have followed the example for the formatting of the actionable notifications, which at first seemed to be working find, but i’ve noticed that multiple actions are being triggered when clicking on the notification button, even though i’m only expecting one to run
Yes, same in 1.7. How and where to set those 2 options?
EDIT: Yes I found the two options… Now I will try them…
did you make sure to change the action keywords? I just tested this myself with 2 actions and both actions were sent separately when i selected them. both automations below did not run at the same time but only when each action was selected
service data
message: "Test"
data:
ttl: 0
priority: 'high'
actions:
- action: "action1"
title: "button1"
- action: "action2"
title: "button2"
and the automations
- alias: action1
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: action1
action:
- service: notify.mobile_app_pixel_4_xl
data:
message: 'action1'
- alias: action2
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: action2
action:
- service: notify.mobile_app_pixel_4_xl
data:
message: 'action2'
My sensors for battery level and wifi name are working but I thought they would have been prefixed with the device name as set in the app. I’m planning to get my wife to install this app as well, and I don’t want ambiguity of “battery_level” vs. “battery_level_2” depending on which phone connects first.
Any entity coming from the app should be prefixed with the device name. At least the device tracker entity is named after the model of my phone, but even that should use the device name.
I submitted a fix for this exact issue that will be in 0.106 but it wont impact existing installs only new ones.
Also you can rename the entities that are created by the mobile app as they are registered entities. Once your entity is registered, changing the device name in the app will not override it. There is a feature request to set the device name during onboarding that will correct this going foward. In the meantime you can set the device name in Settings > About Phone and next time you install the app it should use that name.
Does this fix encompass not only sensors, but the device tracker and notify service as well?
This fix is only for sensor names.
The notify service call will be updated when you update the device name in App Configuration and then perform a HA restart.
For the device tracker the device name needs to be set before the entity is registered. So if you set it in Settings > About phone then next time you start fresh with the app it will pick up the name you set.
Thanks for fixing that! I guess I can manually update my entries for now.
I have family members that aren’t thrilled with being tracked all the time. Would anyone else be interested in an “only track and share home/away" option in the app? That would satisfy their desire not to be tracked all the time and allow me to finish a number of automation which I currently cannot because of their qualms.
Don’t grant location permissions to the app when you install it and the device tracker and sensors won’t get created. If you don’t want gps you can use nmap or something for home/away detection.
You could use the wifi sensor = your SSID as a home/away sensor
Is there a way to cancel a notification ?
E.g.: a notification is sent to me and my wife’s phone when the alarms hasn’t been armed. Would be nice if the notification was removed from the other phones the moment the alarm was armed.
If you use the app as device tracker, this is an attribute “battey_level” of the tracker.
For me, with 3 differents samsung models, it seems to use the model name and not the device name.
I’m doing something wrong?
E.g. in this case:
He is using SM-G975F and not Galaxy S10+.
If you think it’s not normal tell me and I can open an issue on GitHub.
Yes you can with the tag:
Send this message:
title: "test title"
message: "test message"
data:
tag: myTag
Cancel it:
message: clear_notification
data:
tag: myTag
Yeah they are all different! Here is one for example
- id: NotifyLandingLightOn
alias: Hue - Landing light on longer than x amount of time
description: ''
trigger:
- device_id: 68cd986a7b754aee97572ef6ff36eb8f
domain: light
entity_id: light.landing_light
for:
hours: 0
minutes: 15
seconds: 0
platform: device
type: turned_on
condition: []
action:
service: notify.mobile_app_pixel_3
data:
message: Landing Light has been on for longer than 15 mins
data:
actions:
- action: "turnlandinglightoff"
title: "Turn Off"
Then the action
- id: ActionTurnLandingLightOff
alias: Action - Button - Turn Landing light off
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
data: turnlandinglightoff
condition: []
action:
entity_id: light.landing_light
service: light.turn_off
But this is causing 5 other actions to trigger, but not all of them are triggering!
Figured it out! My error!
data: turnlandinglightoff
Should be
action: turnlandinglightoff
Awesome, thanks !