home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.19k stars 31.15k forks source link

service notify.my_android_tv disappears when restarting home assistant #108296

Open Valiceemo opened 10 months ago

Valiceemo commented 10 months ago

The problem

Upon restarting HA, the service notify.my_android_tv disappears Resulting in an error and a repair notification:

The automation "Ring Motion Detected Notify on TV" (automation.ring_motion_detected_notify_on_tv) has an action that calls an unknown service: notify.lounge_tv.

Only 'fix' is to uninstall the integration, and reinstall

What version of Home Assistant Core has the issue?

2024.1.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Notifications for Android TV / Fire TV

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nfandroidtv

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Not sure this is the relevant log dump, but the only thing showing immediately after a restart

2024-01-18 13:43:06.320 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 96, in _async_start
await gather_with_limited_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 188, in gather_with_limited_concurrency
return await gather(
^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 186, in sem_task
return await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 888, in async_init
flow, result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 916, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 423, in _async_handle_step
if result.get("preview") is not None:
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'


### Additional information

_No response_
home-assistant[bot] commented 10 months ago

Hey there @tkdrob, mind taking a look at this issue as it has been labeled with an integration (nfandroidtv) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `nfandroidtv` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign nfandroidtv` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nfandroidtv documentation nfandroidtv source (message by IssueLinks)

Aasikki commented 10 months ago

I'm having the same issue, but opening the app on my Chromecast with google tv before reloading the integration makes it work again.

Very annoying, as all automations using this to send notifications will fail when the integration isn't loaded.

crafty35a commented 10 months ago

I am seeing the same behavior, the integration fails to load unless I first launch the app (on Nvidia Shield in my case)

Valiceemo commented 10 months ago

Doesn't look like like this integration is being actively maintained unfortunately, so I doubt we will see a fix

Danteba commented 10 months ago

I receive the same error, every time I reboot Home Assistant. But the service is working fine on my Philips Android TV.

gannas42 commented 9 months ago

I am seeing the same behavior and HA sent me repair notices because the automations I have which consume the service are now broken.

ColtonYYZ commented 7 months ago

I have the same error....

"The automation "Doorbell Snapshot" (automation.doorbell_snapshot) has an action that calls an unknown service: notify.android_tv_fire_tv."

I hope the creator will see these messages and fix the error. :(

ColtonYYZ commented 7 months ago

Note: I was able to get it working again. I removed the entry in Notifications for Android TV/Fire Stick integration, restarted HAss, and then re-added the entry. Then restarted HAss and it works again. I didn't remove the integration, just the entry - just to clarify. So now it's working again for me!

Edit: Simply disconnecting the WiFi on my Firestick and reconnecting to my WFi allows me to reload the integration successfully, so no need to remove the integration. Just disconnect and reconnect to your wifi and reload the integration fixes it until next reboot of HAss.

sVnsation commented 6 months ago

Same here. Upon restarting HA, the service notify.android_tv becomes State missing until the TV is switched on.

sVnsation commented 2 months ago

@tkdrob would you like to take a look at this?

b2un0 commented 2 months ago

same 4 me

xbmcnut commented 2 months ago

For what's it worth, I have two TVs; a Sony with built-in CC & a Samsung with an external Google TV dongle. For me, it's always only the Sony that's goes offline even though I have all of the power saving off.

sVnsation commented 1 month ago

@xbmcnut @b2un0 @ColtonYYZ @gannas42 @Danteba @crafty35a @Aasikki @Valiceemo @LewisSpring @asgraf @wernerhp @MihaiKrieger @JonasGe @Skinah @EF01 please vote for pull request #128958 if you want to see this issue fixed.

In the meantime, you can use the code from the pull request and create a custom_component to test the fix locally.

ColtonYYZ commented 1 month ago

@sVnsation, stupid question but how do I vote? I'm not overly verse using github. I'm sorry. :( Happy to do it, just neeed to know how.

sVnsation commented 1 month ago

@ColtonYYZ Press the "Thumb up" icon of the first message in the pull request and/or write a message with "+1"

ColtonYYZ commented 1 month ago

@sVnsation Thanks! I was looking for something like that but guess I was too tired to see it. LOL