Hi,
I know that this has been an issue before and I have to the best of my ability tried to find a solution in other posts - but I still do not get it to work.
As of now I get a push message but the alternative actions are not shown.
I have updated push settings in notification settings in the app on my iPhone.
I have the following setup. I will try to include as much as possible.
hass.io v.0.87.0
In configuration.yaml I have:
ios: !include yaml/ios.yaml
I yaml/ios.yaml I have:
push:
categories:
- name: Test
identifier: 'test'
actions:
- identifier: 'LAMP_OFF'
title: 'Turn off'
authenticationRequired: true
- identifier: 'IGNORE'
title: 'Do nothing'
authenticationRequired: true
I have two automations - one to send the push notice (17) and one to handle the action choosen (18):
- id: '17'
alias: Test push notification
trigger:
- platform: state
entity_id: light.golvlampa_3
for:
seconds: 30
from: 'off'
to: 'on'
condition:
condition: state
entity_id: light.golvlampa_3
state: 'on'
action:
- service: notify.ios_fredriks_iphone7
data_template:
message: Trying to turn the lamp off..
title: ”Our house"
data:
push:
category: 'test'
badge: 0
- id: '18'
alias: Test push off
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: 'LAMP_OFF'
action:
- service: light.turn_off
entity_id: light.golvlampa_3
As of now automation 17 renders the message as expected but not the actionable notifications. Therefore automation 18 is not relevant yet.
I can see two potential problems:
- The push categories in ios.yaml are not correct and therefore do not load (how do I know?)
- The push data in automation 17 are incorrect or insufficient.
I do not understand the significance of including or not including a badge number. What function does it have?
In some cases I see that action_data are specified. I do not know when and if that is needed. The following description in the documentation is not clear to me:
actionData
is a dictionary with parameters passed in theaction_data
dictionary of thepush
dictionary in the original notification.
I would be very happy if somebody could help me.