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

Update discovery configs to be compatible with Home Assistant's expectations #93

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

antoniomika
Copy link
Contributor

In 2024, Home Assistant will stop handling names in discovered MQTT sensors as it currently does.

Currently, it strips the device name prefix from the config in order to abide by it's entity name expectations. This will be deprecated and removed in 2024. Here's the relevant post from them.

This is a simple fix and resolves the issue. I've tested this with my personal home assistant install by doing the following:

  1. Build the project and run in an emulator. I commented out the gradle plugins for google services and crashlytics, and updated my local.properties to include the required parameters for gradle (code, hassUrl, broker, brokerUsername, brokerPass).
  2. Connect it to home assistant as you would normally. Go to home assistant, restart all services (I rebooted the host through System -> Power button -> Advanced -> Reboot system. I wasn't able to get the supervisor repair system to re-run properly to show the error without doing this.
  3. Notice that the warning about the entity name change shows up
  4. Make the changes in this diff, re-run the application in the emulator
  5. Reboot Home Assistant again (as done in step 2) and notice that the errors go away

Closes #90

@netlify
Copy link

netlify bot commented Aug 17, 2023

Deploy Preview for wallpanel canceled.

Name Link
🔨 Latest commit 31641bf
🔍 Latest deploy log https://app.netlify.com/sites/wallpanel/deploys/64dd8dbd184b02000783c7b9

@antoniomika
Copy link
Contributor Author

Hey @TheTimeWalker,

Anything else I need to do to help get this over the line?

@TheTimeWalker
Copy link
Owner

Nothing to do, code-wise looks good. Will get to it asap

@TheTimeWalker
Copy link
Owner

Thanks again for the PR! I have used it as a base to tweak it a bit more

@TheTimeWalker TheTimeWalker merged commit 7421fee into TheTimeWalker:master Aug 29, 2023
4 checks passed
@antoniomika antoniomika deleted the antoniomika-patch-1 branch August 29, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Breaking changes for MQTT in Home Assistant 2023.8
2 participants