Hi, this is my first time posting to the forums so i apologise if ive put my query in the wrong section.
I am fairly new to HASS and im not a programmer at all. I have a Sony Bravia TV which i bought about 2 months ago and i came across this https://home-assistant.io/components/notify.nfandroidtv/ component. I have added it to my config, however i can’t quite work out how to get a notification to actually show on my TV. Just to begin with i was trying to get it to notify me every 30 seconds as i thought that was easy to test.
i have the following under automation, but i can’t work out how i am to pass the json attributes to the service.
when using the services developer tools i can successfully get a notification to appear, i just for the life of me cannot figure out how to get it to do it from an automation. Any and all help is greatly appreciated.
Please post your code using the preformatted text option - this preserves the formatting so we can rule that out as an issue.
To do that, simply highlight whatever code you’re posting and then press the preformatted text button in the editor. I’ve included an image so it’s easier to identify.
Please, no apologies are necessary! It’s not very obvious and I had a lot of trouble when I started posting code so I made that image to help people out.
Yes, the app has to be installed on the TV. Otherwise there would be no target for HASS to deliver the notifications to. Android TVs don’t have an integrated notification-service which can be called through an API. Hence the app that provides this functionality.
Regarding configuration:
First the notification-platform has to be configured on it’s own. Much like with most of the other notification platforms. Based on what’s described in the documentation it should look something like this:
I have the same issue wih my Bravia Smart TV. @Stewface, how did you resolve the problem and could you share your notify.yaml and automation.yaml?
Also, will the notification work when TV is on standby?
Do you have an Android smartphone? Besides the “server”-app which you have installed on the TV, there also is a “client”-app for your smartphone with which you can trigger test-notifications. If those don’t work as well, the issue is outside of the scope of HASS.
Because it is not needed. I only have the TV application installed as well. For testing purposes though I once had the mobile app installed, and I can imagine it would help in finding the issue you’re stuck at.
- alias: Notify when front door is open
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000158511a
- service: notify.nfandroidtv
data:
message: Front door is OPEN
I assume indentation got a little messed up while copying. Proper indentation for the audomation (notice the service / action part) should look like this:
- alias: 'Notify when front door is open'
trigger:
platform: state
entity_id: binary_sensor.door_window_sensor_158d000158511a
to: 'on'
action:
service: notify.Bravia
data:
title: "Home Assistant"
message: "Front doof is OPEN"
I’ve also added the “to” to the state of the trigger. Otherwise you would also receive the message when the door closes.
And most importantly: the service is not notify.nfandroidtv but instead notify.bravia, since that’s how you’ve named the service.
To generally make sure HASS is capable of notifying your TV:
Open the HASS UI
Go to the services overview (the remote control icon)
Select the Domain notify
Select Service bravia
Enter a random message like {"message":"test"}
Click the call service button. This should raise the notification on the TV.