Has anyone successfully made an actionable notification with a camera the push?
I was trying to do this and here is my sample code but it only shows the first category. From what I understand my code is asking for two push categories
doorbell_alert:
sequence:
- service: notify.iOSApp
data:
message: "Ding, Doorbell!!"
push:
category: "DOORBELL"
action_data: # Anything passed in action_data will get echoed back to Home Assistant.
entity_id: light.test
my_custom_data: foo_bar
category: camera
entity_id: camera.door_camera
I can with this service call (from dev tools-services):
domain: notify
service: ios {"title": "test", "message": "Like I said: this is a test", "data": {"push": {"category": "camera"}, "entity_id": "camera.camera_entity"}}
What I can’t do is merge a ‘camera’ category notification with custom actions. In the iOS yaml config I have:
push:
categories:
- name: camera
identifier: 'camera'
actions:
- identifier: 'CAM_YES'
title: 'Do it!'
activationMode: 'background'
authenticationRequired: no
destructive: no
behavior: 'default'
context: 'default'
- identifier: 'CAM_NO'
title: 'No'
activationMode: 'background'
authenticationRequired: no
destructive: no
behavior: 'default'
context: 'default'
so I can add actions to the ‘camera’ category, but it doesn’t work as expected. If I use ‘camera’ as category, I receive the camera video stream notification, without any actionable button. But, If I use ‘CAMERA’, I obtain the actions without the stream…
With other custom categories, without video streams, action buttons work as espected. I have an AppDaemon app listening to the different ios.notification_action_fired events and it’s awesome to react and decide actions for HASS with a touch in the wrist (w/apple watch). @robbiet480 is doing a fantastic job with the iOS app.
Other thing I can’t make it work is the textInput behaviour, has anyone made it work? I’d love to order complex instructions to my HASS with a raw text input answering a notification…
In the yaml config:
- name: execorder
identifier: 'EXECORDER'
actions:
- identifier: 'INPUTORDER'
title: 'Tell me'
activationMode: 'background'
authenticationRequired: no
destructive: no
behavior: 'textInput'
context: 'minimal'
textInputButtonTitle: "I'm listening" # Only for iOS 10 when behavior is TextInput.
textInputPlaceholder: 'tell me more' # Only for iOS 10 when behavior is TextInput.
I’m also trying to make this work. Is there any chance @robbiet480 you could update the example at https://home-assistant.io/docs/ecosystem/ios/notifications/content_extensions/ to include the actions? I’d like to make a push notification if I left my garage door open to send me a feed and give me the option to close the door. So far I can get the notification (no thumbnail) and when I tap it I do see the live feed but my actionable notifications don’t show up. I’m not sure how to combine them and looks like there’s quite a few trying to figure it out too.
@Jer78@azogue were you guys able to get it working with both camera and custom actions? I want to do something similar but faced the same issue you guys posted
No, sorry. I use them a lot but not with cameras. I don’t know where the problem is.
I started to use the telegram bot for almost all notifications, because you can make new ‘action buttons’ without the need to ‘declare’ them before. I hope (don’t know) the next iOS version will be more customisable for the action buttons…
I get a notification just fine, but no camera snapshot.
I also tried to call the service with the example and i just get the notification but no snapshot.
I have restarted the phone and Home Assistant several times and it never works.
try this config and open ios app go to setting scroll down find notifications settings tap on update notifications by the way i’m using the old automations
automation old:
#camera
- alias: camera
trigger:
platform: state
entity_id: binary_sensor.hikvision_sensor_motion
from: 'off'
to: 'on'
action:
service: notify.ios_your_iphone
data:
message: Something happened at home!
data:
push:
category: camera
entity_id: camera.hikvision
what action in your notification are you thinking about? i thought showing a picture of your camera stream within an ios notification was what you where looking for?
No. If you see the documentation here, you’ll see a video with custom actions. The idea is to show the camera (front door / garage) and have actionable notifications like Open Door / Garage, Close Door / Garage. Robbie said it’s possible but no one can figure it out and he’s MIA.