Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Send Web UI persistent notifications to Mobile Devices doesn't work #288

Open
1 task
ElVit opened this issue Mar 21, 2022 · 14 comments
Open
1 task
Labels
blueprint An issue related to a blueprint bug Something isn't working

Comments

@ElVit
Copy link

ElVit commented Mar 21, 2022

Blueprint name

Send Web UI persistent notifications to Mobile Devices

Home Assistant Core Version

2022.3.5

Home Assistant Installation Type

Home Assistant Operating System

Description

Blueprint doesn't work with the iOS Home Assistant App.
The persistent notifications are not forwarded to my iPhone.
But I can send a notification to my iPhone by sending notify.mobile_app_myiphone.

Automation YAML config

id: '1643998917699'
alias: Update notification to all iPhones
description: ''
use_blueprint:
  path: EPMatt/persistent_notification_to_mobile.yaml
  input:
    mobile_notify_service: notify.mobile_app_myiphone
    notification_id: '1234'

To Reproduce

  1. Create automation with this blueprint. Define only mobile_notify_service and notification_id = 1234
  2. persistent_notification.create (with messgae, title & notification_id = 1234)
  3. -> no notify message on my iPhone
  4. notify.mobile_app_myiphone (with message & title)
  5. -> I can see a notification message on my iPhone

Expected behavior

All persistent notifications with the ID="1234" shall be forwarded to my iPhone.

Actual Behaviour

I don't get any notifications to my iPhone.
I get the follwing error in trace step details:
Error: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

@ElVit ElVit added blueprint An issue related to a blueprint bug Something isn't working labels Mar 21, 2022
@EPMatt
Copy link
Owner

EPMatt commented Apr 11, 2022

Hi @ElVit,

thank you for reaching out here, I'm sorry for my huge delay.
It seems the event is not properly recognized after the automation has been triggered. Could you please share screenshots from the HA trace tool regarding the automation you're setting up with this blueprint?

Thank you for your patience!

@EPMatt EPMatt added the status - waiting for feedback Waiting for additional feedback from people involved in the issue / pull request label Apr 11, 2022
@Xx-Ness-xX
Copy link

Hello,

I have the exact same error message, and my notification ID is set to http-login, see the details below:

Screenshot_20220708-154248

Blueprint name

Send Web UI persistent notifications to Mobile Devices

Home Assistant Core Version

2022.3.9

Home Assistant Installation Type

Home Assistant Core

Description

Blueprint doesn't work with the Android Home Assistant App. The persistent notifications are not forwarded to my Android. But I can send a notification to my Android by sending notify.mobile_app_pixel_5.

Automation YAML config

id: '1631811045862'
alias: Invalid login attempts notifications to Mobile Devices
description: ''
use_blueprint:
  path: EPMatt/persistent_notification_to_mobile.yaml
  input:
    mobile_notify_service: notify.mobile_app_pixel_5
    notification_id: http-login

To Reproduce

  1. Invalid login attempts
  2. persistent_notification.create
  3. -> no notify message on my Android
  4. notify.mobile_app_pixel_5 (with message & title)-> I can see a notification message on my Android

Expected behavior

All persistent notifications with the ID="http-login" shall be forwarded to my Android.

Actual Behaviour

I don't get any notifications to my Android. I get the follwing error in trace step details: Error: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'

Additional Details

  • I'd like to help developing a fix for this issue.

Screenshots

No response

Additional context

No response

@github-actions github-actions bot removed the status - waiting for feedback Waiting for additional feedback from people involved in the issue / pull request label Jul 8, 2022
@Xx-Ness-xX
Copy link

Hi

any update on this? Thanks

@Fruitsmart
Copy link

Fruitsmart commented Dec 19, 2023

Hello i have the same mistake.
Core 2023.12.3
Supervisor 2023.11.6
Operating System 11.2
Frontend 20231208.2

@niemtec
Copy link

niemtec commented Dec 29, 2023

I've noticed the same issue in my setup 😞

@niemtec
Copy link

niemtec commented Dec 29, 2023

I was able to create a dummy automation with the following action and it worked:

service: notify.mobile_app_xxx
data:
  message: "{{ trigger.notification.message }}"
  title: "{{ trigger.notification.title }}"

@Xx-Ness-xX
Copy link

I was able to create a dummy automation with the following action and it worked:

service: notify.mobile_app_xxx
data:
  message: "{{ trigger.notification.message }}"
  title: "{{ trigger.notification.title }}"

Hi, could you please elaborate how you get this to work?

@Fruitsmart
Copy link

Fruitsmart commented Dec 31, 2023

Error rendering data template: UndefinedError: 'trigger' is undefined

grafik

@niemtec
Copy link

niemtec commented Jan 2, 2024

Hi, could you please elaborate how you get this to work?

Sure, I created a new automation that is triggered on "When persistent notification is updated" and set the above as a call service action.

So the automation looks like so:

alias: Notification Forward
description: ""
trigger:
  - platform: persistent_notification
    update_type:
      - added
      - updated
      - current
    notification_id: ""
condition: []
action:
  - service: notify.mobile_app_jakubs_iphone_15
    data:
      message: "{{ trigger.notification.message }}"
      title: "{{ trigger.notification.title }}"
mode: single

@niemtec
Copy link

niemtec commented Jan 2, 2024

@Fruitsmart it won't work in developer tools this way because trigger only exists in automation space.

@Fruitsmart
Copy link

@niemtec Thank you very much, it's working perfectly. I thought I could test it in the developer tool. Thanks for that!

@niemtec
Copy link

niemtec commented Jan 3, 2024

@Fruitsmart glad it's working for you! Sorry, I could have been clearer with my initial comment... and maybe not type it out on a phone 😅

@Fruitsmart
Copy link

Fruitsmart commented Apr 30, 2024

@niemtec "Hi, does this automation still work for you? I'm getting the following error."

Error rendering data template: UndefinedError: 'dict object' has no attribute 'notification'

image

@niemtec
Copy link

niemtec commented May 28, 2024

@niemtec "Hi, does this automation still work for you? I'm getting the following error."

Error rendering data template: UndefinedError: 'dict object' has no attribute 'notification'

image

Yeah still works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blueprint An issue related to a blueprint bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants