H
HASS.Agent•3w ago
asottile

Enhance notifications

Hi, I installed HASS.Agent today and I have a couple of questions about notifications: - is it possible to change the notification style and make it more prominent? E.g. a pop-up window - is it possible to create an automation that continues differently depending on the answer on the notification itself? E.g. clicking the Ok or the Cancel button? Thank you for your assistance.
4 Replies
Amadeo
Amadeo•3w ago
hello 🙂
is it possible to change the notification style and make it more prominent? E.g. a pop-up window
not atm I'm afraid, HASS.Agent uses the windows API to show notifications, creating a popup ones would basically mean creating our own framework from ground up (not saying that it won't happen sometime, just not possible atm ootb)
is it possible to create an automation that continues differently depending on the answer on the notification itself? E.g. clicking the Ok or the Cancel button?
yup, for example: notification call:
service: notify.amadeo_pc
data:
title: Some msg title
message: Test msg
data:
image: >-
https://smea.uw.edu/wp-content/uploads/sites/11/2017/03/CURRENTSBLOG_Cat_2.jpg
actions:
- action: "yes"
title: "Yes"
- action: "no"
title: "No"
inputs:
- id: testId
text: testText
title: testTitle
service: notify.amadeo_pc
data:
title: Some msg title
message: Test msg
data:
image: >-
https://smea.uw.edu/wp-content/uploads/sites/11/2017/03/CURRENTSBLOG_Cat_2.jpg
actions:
- action: "yes"
title: "Yes"
- action: "no"
title: "No"
inputs:
- id: testId
text: testText
title: testTitle
response/action automation in HA:
alias: HASS Notification test
description: ""
trigger:
- platform: event
event_type: hass_agent_notifications
event_data:
action: "yes"
condition: []
action:
- service: notify.amadeo_pc
data:
message: "{{ trigger.event.data.input.testId }}"
title: Action Response
mode: single
alias: HASS Notification test
description: ""
trigger:
- platform: event
event_type: hass_agent_notifications
event_data:
action: "yes"
condition: []
action:
- service: notify.amadeo_pc
data:
message: "{{ trigger.event.data.input.testId }}"
title: Action Response
mode: single
asottile
asottileOP•2w ago
This is great, thank you! And it is possible to trigger a response/action in HA if there is no answer within a timeout from the notification (e.g. if the user is AFK)?
Amadeo
Amadeo•2w ago
hm, I'm terrible at HA automations (I use nodered mostly) but I'm quite sure that it's possible just don't know how 😄
asottile
asottileOP•2w ago
Thanks, I'll give it a try
Want results from more Discord servers?
Add your server