Closed CCOSTAN closed 4 years ago
anyone have this working?
Yes, let me post up my example tomorrow. I've been using it with my BBQ to keep replacing the internal temperature of the food I'm cooking with my Meater+ jcallaghan/home-assistant-config#50.
Yes, let me post up my example tomorrow. I've been using it with my BBQ to keep replacing the internal temperature of the food I'm cooking with my Meater+ jcallaghan/home-assistant-config#50.
Do the iOS notifications replace each other when a new one comes in?
Running this easy test shows that it is not working. :( They keep creating new popups on the phone. CAn someone else test this?
title: "Test"
message: "This is a Test Message that should only appear once since it replaces the last one."
data:
apns_headers:
'apns-collapse-id': "Test_Message"
Haven't got iPhones to test, and shouldn't make a difference, but the docs show the apns-collapse-id in single quotes, ie: 'apns-collapse-id': 'test_message'
I've also seen many issues around the apns-collapse-id in many different projects, so could be any number of causes! I'd be inclined to try lower case only and no special characters also, in case certain characters are not supported.
Good Suggestions @pinkywafer . I tried them but still no dice.
title: "Test"
message: "This is 1 Test Message that should only appear once since it replaces the last one."
data:
apns_headers:
'apns-collapse-id': 'test'
Same behaviour for me. Since posting my previous that where I thought I had this working I've actually observed it isn't working. I need to check on my iPad as I think this is where I saw it working.
Just testing with @CCOSTAN now the original message duplicates for me and then it is followed by the new message but only with the second message. The third message is delivered without any duplication but the old thread/message is not replaced.
Was using the old notify.ios*
service rather than the new notify.mobile_app_*
service. Switching everything to that made everything work as expected.
https://companion.home-assistant.io/docs/getting_started/migration/
!iOS
Great summary Carlos. This explains why my BBQ temperatures were working on my iPad whereas I too am still using the ios* service for my iPhone. Normally just copy and pasting from a previous automation. Time for some notify service find and replace me thinks. Great collab!
@jcallaghan Thanks for the additional testing. @TomBrien was the superstar who pointed me towards the solution though. :)
Be sure to clean out the old stuff @jcallaghan. I had a few things leftover that the migration guide pointed out for cleaning.
Add in the ability to replace notifications.
https://companion.home-assistant.io/docs/notifications/notifications-basic#replacing-notifications
Specifically for my Medicine alert.