Hi All
Here is the iOS push setup:
push:
categories:
- name: Do you want a bath tonight
identifier: 'doyouwantabath'
actions:
- identifier: 'NOIDONOTWANTABATH'
title: 'No'
activationMode: 'background'
authenticationRequired: true
destructive: false
behavior: 'default'
- identifier: 'YESIDOWANTABATH'
title: 'Yes'
activationMode: 'background'
authenticationRequired: true
destructive: false
behavior: 'default'
The three automations I have are as follows:
First, This one fires off the notification @ 10am asking “Do you want a bath tonight?” - I get this and displays “Do you want a bath tonight?” as a banner on IOS
- id: '1587474512128'
alias: Bath Tonight - iOS Notification
description: ''
trigger:
- at: '10:00:00'
platform: time
condition: []
action:
- data:
data:
push:
badge: 0
category: doyouwantabath
message: Do you want a bath tonight?
service: notify.all
If as per the IOS push I press and hold the banner I get a ‘Yes’ or “No” options
If ‘Yes’ is pressed, it fires the automation below and puts the Waterheater into a “Manaul” mode
- id: '1587473272743'
alias: Bath Tonight - Yes
description: ''
trigger:
- event_data:
actionname: YESIDOWANTABATH
event_type: ios.notification_action_fired
platform: event
condition:
- after: '10:00:00'
before: '12:00:00'
condition: time
action:
- data:
message: Yay! Someone stinks and is having a bath
service: notify.all
- data:
option: Scheduled
entity_id: input_select.waterheater_status
service: input_select.select_option
- device_id: b44fd6df9b8f4af789d4e592e5ef146b
domain: switch
entity_id: switch.waterheaterbottom
type: turn_on
- delay: 02:00:00
- device_id: cb152ce39838407f878245ffe87049f3
domain: switch
entity_id: switch.waterheatertop
type: turn_on
- delay: 02:00:00
- device_id: b44fd6df9b8f4af789d4e592e5ef146b
domain: switch
entity_id: switch.waterheaterbottom
type: turn_off
- device_id: cb152ce39838407f878245ffe87049f3
domain: switch
entity_id: switch.waterheatertop
type: turn_off
- data:
option: Standby
entity_id: input_select.waterheater_status
service: input_select.select_option
If ‘No’ pressed it fires the automation below and put the water heater into “Idle” temp mode (Another automation)
- id: '1587475086548'
alias: Bath Tonight - No
description: ''
trigger:
- event_data:
actionName: NOIDONOTWANTABATH
event_type: ios.notification_action_fired
platform: event
condition: []
action:
- device_id: b44fd6df9b8f4af789d4e592e5ef146b
domain: switch
entity_id: switch.waterheaterbottom
type: turn_off
- device_id: cb152ce39838407f878245ffe87049f3
domain: switch
entity_id: switch.waterheatertop
type: turn_off
So, At this point everything works 100%
Now, the issue comes in when somone does not press and hold the notification to open it and get the ‘Yes’ or ‘No’ buttons but just rather “Tap” on the notification
It just opens the app and fires the ‘Yes’ and starts to heat the water
I cannot figure out why it would be doing this. As suggested I have tried putting no first and yes second but still the same
Hope it makes sense. I have tested many times and get the same reseult
I have reset my app a, cache and deleted/reimported the rule