Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

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

Merged
TheTimeWalker merged 1 commit into
TheTimeWalker:masterfrom
antoniomika:antoniomika-patch-1
Aug 29, 2023
Merged

Update discovery configs to be compatible with Home Assistant's expectations#93
TheTimeWalker merged 1 commit into
TheTimeWalker:masterfrom
antoniomika:antoniomika-patch-1

Conversation

@antoniomika

Copy link
Copy Markdown
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

netlify Bot commented Aug 17, 2023

Copy link
Copy Markdown

Deploy Preview for wallpanel canceled.

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

@antoniomika

Copy link
Copy Markdown
Contributor Author

Hey @TheTimeWalker,

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

@TheTimeWalker

Copy link
Copy Markdown
Owner

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

@TheTimeWalker

Copy link
Copy Markdown
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
@antoniomika antoniomika deleted the antoniomika-patch-1 branch August 29, 2023 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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