-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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
Fix issue 108296 - nfandroidtv service notify disappears when restarting home assistant #128958
base: dev
Are you sure you want to change the base?
Fix issue 108296 - nfandroidtv service notify disappears when restarting home assistant #128958
Conversation
Hey there @tkdrob, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
15e2396
to
4a94fb9
Compare
803f7d7
to
19372ad
Compare
19372ad
to
cdf8099
Compare
+1 |
Thanks for the fix! |
Im new to this: Can I confirm that I just need to replace my local HA files with the below new files for the fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is incorrect.
- Previously we tried connecting when setting up the integration, and if we could not connect we would raise
ConfigEntryNotReady
, causing the setup to be tried again a minute later. - I am not sure how error handling fixes the notify service dissapearing from Home Assistant. Can you elaborate on that? Because if the integration is unable to setup, it would have a reason to
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
@joostlek Thank you for reviewing this pull request. I did some further testing. So in my opinion it's perfectly fine to remove |
Right, let me ask around to see what we want with this situation |
+1 |
+1 |
🎗️ |
My two cents:
|
Any news on this? I would also be happy to write tests if the changes are accepted. |
sVnsation:sVnsation-nfandroidtv_issue_108296
Breaking change
No
Proposed change
Fixes Issue #108296
These changes should ensure that the notify action ‘notify.android_tv’ is always available, even if the Android Device (TV) is switched off. The connection is only established when a message is actually to be sent.
in
__init__.py
:hass.data[DOMAIN][entry.entry_id]
to be able to use it later innotify.py
.in
notify.py
:NFAndroidTVNotificationService
class has been customised to store the host information and establish the connection when needed.send_message
method now tries to establish a connection if it does not yet exist and catchesConnectError
exceptions.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: