Great feature request, will be out in the next version
EDIT: BTW, the reason itās not working is because attachment is expected to be an image, audio or video file. You will need to tweak the format slightly to open URLs.
Awesome! Love the app you have built and glad to see you keep improving it. Figured it was looking for some type of file association with the attachment, but wanted to try all the possible combinations before posting.
Yes, it is working for me. How do you have the notification setup? Below is my notification to open waze and start navigating if there is heavy traffic.
The trigger is set to send the notification if I leave my house between 6:30-7:00 on a weekday if āalternate routeā is turned on. For the alternate route sensor, I have a google travel time sensor set up and compare the distance listed in that sensor to the usual commute distance. If those two numbers are different, it turns āalternate routeā ON.
trigger:
platform: state
entity_id: input_boolean.ios_home
to: 'off'
condition:
condition: and
conditions:
- condition: time
after: '06:30:00'
before: '07:00:00'
weekday:
- mon
- tue
- wed
- thu
- condition: state
entity_id: binary_sensor.alternate_route
state: 'on'
action:
service: notify.ios_michael_iphone
data:
title: "Work Detour"
message: "Navigate using detour?"
data:
url: waze://?favorite=work
i wrote it as:
action:
service: notify.ios_phone
data:
title: āNew Version of Home Assistant Available!ā
message: āCheck the release notes here.ā
data:
attachment:
url: https://www.home-assistant.io/blog/
Do regular notifications work (ones without links)? I would try removing the āattachmentā portion and using double quotes.
action:
service: notify.ios_scotts_iphone
data:
title: "New Version of Home Assistant Available!"
message: "Check the release notes here."
data:
url: https://www.home-assistant.io/blog/
I just tested it by going to the āServicesā section under developer tools. Under āServiceā select notify.ios_scotts_iphone and under service data, I used the following:
{"title":"'New Version of Home Assistant Available!'","message":"Check the release notes here.","data":{"url":"https://www.home-assistant.io/blog/"}}
ok. i got that workingā¦ is there any way to do that with an actionable notification? so i have set up options for āupdateā, āread release notesā, āstop reminding meā, and āremind me laterā. i would like it to just open the release notes when i click that option, but instead from what i can tell it would just have to send another notification to do so
Is this still working for you? I am trying to set up the exact same automation but canāt get the URL to pass either using Google, Waze or Apple maps. The notification just ignores it.
Yes, it is still working perfectly for me. Not sure why it wouldnāt be working for you. If you can post your code, I can take a look at it and see if everything was set up correctly there. If you are getting the notification on your phone, you can just paste the āActionā piece.
Hereās the code in question. Iāve not gotten as far as building out the automation with triggers/conditions (at present Iāve just set it to go at a time of day, and am triggering it via automation.trigger to test it). Iāve commented out the other services Iāve tried to implement, none of these are working. iOS simply shows the title/message and no map.
Iāve tried using data: attachment: and that has no change.
Okay. I pasted that into an automation and it worked perfectly. What happens when you click on the notification? Does it take you into the Home Assistant app or does it do nothing at all?
Ahhh ok - Iād not followed it through HA previously as Iād assumed it would direct me straight to Waze/Google/Apple etc. I can click the notification and it takes me into HA and then I can click again for directions. Problem solved - the error was the user!
Glad you got it sorted out. If you click on the settings button (Gear in bottom right) in the HA app, scroll down to āNotification Settingsā, you can turn off āConfirm before opening URLā. If you do that, when you click on the notification, it will open HA and then switch right over to the correct app. It skips you having to click again to get the directions.