arsaboo
(Arsaboo)
October 30, 2017, 9:03pm
1
I am trying to use the alert
feature with iOS actionable notifications. I have the following in my config:
alert:
abode_updates:
name: Abode updates are off
done_message: Abode updates enabled
entity_id: input_boolean.abodeupdate
state: 'off'
repeat: 30
can_acknowledge: True
skip_first: True
notifiers:
- ios_abode_updates
I configured the notifier as follows:
notify:
- platform: group
name: ios_abode_updates
services:
- service: ios_alokiosiphone
data:
message: 'Enable Abode updates?'
data:
push:
badge: 0
category: "abode_updates"
The iOS notifications are configured as:
ios:
push:
categories:
- name: Abode Updates
identifier: 'abode_updates'
actions:
- identifier: 'ENABLE_ABODE_UPDATES'
title: 'Enable Abode Updates'
activationMode: 'background'
authenticationRequired: yes
destructive: yes
behavior: 'default'
I get the notification, but the action is not carried out. If I put it in an automation , it works. If anyone has a working example of using alert with iOS notifications, I would love to see it.
1 Like
rabittn
(Ryan)
October 31, 2017, 11:52am
2
This works for me.
- name: ios_group_chicken
platform: group
services:
- service: ios_chelseas_iphone_app
data:
title: 'Alert'
data:
push:
category: 'chicken_door'
arsaboo
(Arsaboo)
October 31, 2017, 12:31pm
3
Ahh…looks like it does not like message
in there. That makes sense, message
is coming from the alert
. I will try it out. BTW…can you extend this to add multiple users?
rabittn
(Ryan)
October 31, 2017, 12:50pm
4
yes, I have multiple users like this.
- name: ios_group_chicken
platform: group
services:
- service: ios_chelseas_iphone_app
data:
title: 'Alert'
data:
push:
category: 'chicken_door'
- service: ios_ryans_iphone_app
data:
title: 'Alert'
data:
push:
category: 'chicken_door'
not really sure if this is the right place to respond but you seem heavy into these iOS actionable notifications…
all i would like is a notification with an option to set an input_boolean to off, or on depending on the alert of course .
something like this:
action:
service: notify.ios_iphone #w_m
data:
message: "somethingmin on, check the situation home)"
# data:
# push:
# badge: 5
action_data: # Anything passed in action_data will get echoed back to Home Assistant.
entity_id: input_boolean.notify_master_switch
my_custom_data: 'On'
this is incorrect, but i cant find any documentation how together the input_boolean set correctly.
Please have a look?
Thanks,
Marius
rabittn
(Ryan)
March 21, 2018, 7:47pm
6
Check out my solution here.
With the fix in HA 0.54 we can now send a camera stream and actions to an IOS device. A limitation of this is the actions must be the same no matter what camera stream you send.
With the below config I attempted to make a more dynamic approach. I can now send a camera stream with two generic action buttons. and HA will interpret my answer based on the entity ID and button pressed.
In the IOS conf.
ios:
push:
categories:
- name: camera
identifier: 'camera'
actions:
…
o wow thats impressive. will have to study on this…
quick one: not really sure how to get from the action_data: entity_id to the actual action.
as said, for starters i simply want the notification tell me something is picked up and present me with a button on with i can activate an automation.
i have the picking up, the following notification and the final automation. Just need the linking button in the iOS app…
Please see if you can help me there?
selecting a sound file directly works fine, but doing so with a template based on an input_select doesn’t just yet.
What must i change to get it to play this:]
sequence:
- service: notify.ios_telefoonmhb
data:
title: "Play Sound"
message: "Sound is playing"
data:
push:
sound: "{{states.input_select.speech_sound.state}}"
call it a sound_template ;-)?
rabittn
(Ryan)
March 22, 2018, 11:36pm
9
You want a data_template:
sequence:
- service: notify.ios_telefoonmhb
data_template:
title: "Play Sound"
message: "Sound is playing"
data:
push:
sound: "{{states.input_select.speech_sound.state}}"
thanks,
figured that out indeed. working nicely.
Any thoughts why this wont sound? i see the message on my phone, the template is correct in the dev-tools, but n sound is playing:
- service: notify.ios_phone
data_template:
title: "Activity Speech"
message: "Please listen"
data:
push:
sound: >
{% if is_state ('input_select.activity','Opstart') %} "US-EN-Morgan-Freeman-Welcome-Home.wav"
{% elif is_state ('input_select.activity', 'Opstaan') %} "US-EN-Morgan-Freeman-Good-Morning.wav"
{% elif is_state ('input_select.activity','Aan de slag') %} "US-EN-Morgan-Freeman-Turning-On-The-Lights.wav"
{% elif is_state ('input_select.activity', 'Home theater') %} "US-EN-Morgan-Freeman-Starting-Movie-Mode.wav"
{% elif is_state ('input_select.activity','Gym') %} "US-EN-Morgan-Freeman-Motion-In-Game-Room.wav"
{% elif is_state ('input_select.activity', 'Selamat makan') %} "US-EN-Morgan-Freeman-Motion-In-Kitchen.wav"
{% elif is_state ('input_select.activity', 'Uit huis') %} "US-EN-Morgan-Freeman-Vacate-The-Premises.wav"
{% elif is_state ('input_select.activity', 'Naar bed') %} "US-EN-Morgan-Freeman-Good-Night.wav"
{% endif %}
klm
(WZ)
September 28, 2018, 12:19am
11
Having a hard time getting this to work. Any pointers?