Notification problem on Nvidia Shield TV

I have a Nvidia Shield TV. My problem is this I use the notification service as indicated (Notifications for Android TV / Fire TV - Home Assistant) it works

{
“message”: “Messagetext”,
“title: “My Notification”,
“data”:{
“file:{
“path”:”/home/homeassistant/.homeassistant/www/doorbell.jpg”
}
}
}

But if I make an automation it doesn’t work.

action:
- service: camera.snapshot
  data:
    entity_id: camera.mirilla_camara
    filename: '/home/homeassistant/.homeassistant/www/doorbell.jpg'
- delay: '00:00:02'
- service: notify.shieldtv
  data:
    message: "Llaman al timbre...."
    title: "Puerta"    
    data:
      file:
        path: /home/homeassistant/.homeassistant/www/doorbell.jpg

I have validated the path of the file in the whitelist_external_dirs
Any ideas?

I think…

  data:
    message: "Llaman al timbre...."
    title: "Puerta"    
    data:
      file:
        path: /home/homeassistant/.homeassistant/www/doorbell.jpg

needs to be…

  data_template:
    message: "Llaman al timbre...."
    title: "Puerta"    
    data:
      file:
        path: /home/homeassistant/.homeassistant/www/doorbell.jpg

try to wrap the file path in quotes

1 Like

Good call @dshokouhi, I overlooked that too. :woozy_face:

Correction:

needs to be…

   data_template:
     message: "Llaman al timbre...."
     title: "Puerta"    
     data:
       file:
         path: "/home/homeassistant/.homeassistant/www/doorbell.jpg"

I don’t know why but this working for me:

> action:
> - service: camera.snapshot
>   data:
>     entity_id: camera.mirilla_camara
>     filename: '/home/homeassistant/.homeassistant/www/doorbell.jpg'
> - delay: '00:00:02'
> - service: notify.shieldtv
>   data:
>     message: "Llaman al timbre...."
>     title: "Puerta"    
>     data:
>       file:
>         path: /home/homeassistant/.homeassistant/www/doorbell.jpg
>         auth: "digest"

Thank you!

1 Like

@daekka
How does your whitelist_external_dirs code looks like in configuration.yaml?
Need some help with mine.

BR

whitelist_external_dirs:
- /home/homeassistant/.homeassistant/www

1 Like

Did you ever get this working?
I assume you are using a NVIDIA Shield that is connected to a TV?

Any idea has this changed w/later updates on 2021/12? I can’t push img from URL to Shield as detailed in nfandroidtv - text (title, mesage) goes well. Anyone having luck w/images through URL to Nvidia Shield yet?

What I have is simple script w/normal notification base. Works; however when I add image (under data) - no dice.

you should really read release notes :wink: