Can you add the option for Persistent notifications?
@Blacky. What a truly excellent blueprint. Thank you for taking the time to write it. A Coffee is on it’s way. EDIT: (it would be if I could find the link I thought I saw). Found it!
One of my frustrations with iOS notifications is that there’s seemingly no way to know if the notification has action buttons.
Users who don’t know, just tap the notification and that opens the companion app rather than press and hold to reveal the action buttons.
Is there a way around this that I’ve missed?
My preferred option is that a tap reveals the action buttons and the resulting cancel button dismisses the notification. I appreciate that this is likely aa iOS limitation.
Could the tap open a URL (to the dashboard) and a hold reveal the action buttons?
I am, of course, open to the possibility that I’ve missed something obvious.
@Blacky, could you add the option to use a numeric entity or template for the ‘above’ and ‘below’ triggers?
I’m using several automations where the trigger value needs to be changed periodically and it would mean one change in one place rather than go through all automations making changes.
EDIT:
I just re-read my post and realised it wasn’t clear.
Could you make the arrowed fields templateable?
I’m with you on this one… funny enough, my wife asked the same question tonight and just told me to ‘fix it.’ Unfortunately, I can’t; it’s an iOS limitation.
I’ve asked Home Assistant to develop its own notification platform, allowing the community to shape it according to real needs. Initially, I didn’t give notifications much thought, but in home automation, they’re a crucial feature. Ideally, Home Assistant could create a unified system where notifications work seamlessly across both iOS and Android… no platform-specific differences, just a single, consistent experience. Of course, they have a lot on their plate, but hopefully, one day, they’ll make it happen.
You can see here for the start of the conversation click here
Blacky
Yes, but it’s not template-able is it?
I may have found a bug.
When the action is pressing an input_button, it seems to be doing it twice.
This is quite a simple config whilst I debug.
I suspect that it has something do do with the way a button works in that it just looks for a time change.
I only called the blueprint to run once.
Using the same config to action an input_boolean toggle works as expected.
alias: Generator LPG stock update confirmation notification
description: Creates actionable notification when LPG stock button is pressed
use_blueprint:
path: Blackshome/state-notifications-and-actions.yaml
input:
start_trigger_state_entity:
- input_boolean.test_record_bottle_stock_change
include_start_notify: enable_start_notify_options
start_notify_device:
- 90a4c6adc0fbf56948662e479481428e
start_title: Dryderdale Hall Generator
start_message: Update stock?
include_start_action_buttons:
- enable_start_action_button_1
start_action_button_1: Confirm
include_start_action_button_confirmation: enable_start_action_button_confirmation
start_action_button_confirmation_title: Dryderdale Hall Generator
start_action_button_confirmation_message: LPG stock has been updated
start_action_1:
- action: input_button.press
metadata: {}
data: {}
target:
entity_id: input_button.record_stock_change_button
include_end_auto_actions: []
end_action_1: []
end_trigger_state_entity: []
include_end_action_buttons: []
start_trigger_state: "on"
start_notify_interruption_level: active
include_start_auto_actions:
- enable_start_action_1
include_end_notify: enable_end_notify_options
end_notify_device: []
start_action_button_stop_confirmation_message: Update cancelled
I’m not sure what you are referring to here.
Okay, so to use a button press from an action will result in two presses and trigger an automation that uses the button press twice?
It makes sense but have I got that correct?
If so I’ll find another way.
Depending on your button. Some buttons just have a single action, some buttons have an ON / OFF quick state change. You need to know what it does and then you maybe able to use the time delay.
Blacky
That’s not how input buttons work.
They just return the timestamp for the press.
This is where the problem lies.
This is what you asked. Buttons can have a quick ON / OFF state, I have them.
Some buttons just have a single action and an input button makes a date stamp for the state change.
If you going to use an input button then use 1 - Button Or Any State. There is no problem.
Blacky
How do you define an input_button with on/off state? They just return the timestamp.
An input_button helper has a date stamp you cant change it. If you would like a button with a ON / OFF state you can create one in ESPHome. If you would like to do that please post a question in the esp forum section as there are community members that will help you achieve this.
Blacky
I want to use input_button on the home assistant front end. Not a physical button.
The blueprint causes two state changes in execution for the input_button: one from the press, the other as it executes. This is why it can’t be used.
An input button is stateless. There is no ON/OFF.
I understand input_button trust me.
This will be your YAML. I have tested it here and it is working. In your logbook you get one button press and one automation log.
alias: A State Notifications & Actions Forum
alias: Generator LPG stock update confirmation notification
description: Creates actionable notification when LPG stock button is pressed
use_blueprint:
path: Blackshome/state-notifications-and-actions.yaml
input:
start_trigger_state_entity:
- input_button.advance_central_heating
include_start_notify: enable_start_notify_options
start_notify_device:
- 90a4c6adc0fbf56948662e479481428e
start_title: Dryderdale Hall Generator
start_message: Update stock?
include_start_action_buttons:
- enable_start_action_button_1
start_action_button_1: Confirm
include_start_action_button_confirmation: enable_start_action_button_confirmation
start_action_button_confirmation_title: Dryderdale Hall Generator
start_action_button_confirmation_message: LPG stock has been updated
start_action_1:
- action: input_button.press
metadata: {}
data: {}
target:
entity_id: input_button.record_stock_change_button
include_end_auto_actions: []
end_action_1: []
end_trigger_state_entity: []
include_end_action_buttons: []
start_trigger_state: button_any_state
start_notify_interruption_level: active
include_start_auto_actions:
- enable_start_action_1
include_end_notify: enable_end_notify_options
end_notify_device: []
start_action_button_stop_confirmation_message: Update cancelled
Blacky
In this case, how do I use an action to open a homeassistant tab
“Open a URL” … Introduction | Home Assistant Companion Docs