LordMike / MBW.BlueRiiot2MQTT

Utility to map between Blue Riiots pool API, and Home Assistant MQTT
47 stars 2 forks source link

MQTT name that starts with the device name Error in Home Assistant 2023.08 #80

Closed gllmlbrt closed 1 year ago

gllmlbrt commented 1 year ago

As of 2023.08 we get a warning on all entities that the entity name is the same as the device name and that will no longer be accepted as per Hass 2024.02 (Leaves us some time). image In the above case, I have two "devices" in the Blue Connect app, called "Pool" and "Vildmarksbad".

I believe it requires that the add-on creates the entity with a different nameing convention than just the device-name_suffix. Adding a prefix ?

Or is this something we shoudl change in the configuration somewhere?

gllmlbrt commented 1 year ago

I realise this maybe should have been posted to the Hass Add-on page instead. Let me know if you want it tidy and reposted there or something else ?

DAVIZINH0 commented 1 year ago

as i read yesterday this is a future issue with the MQTT. not only addons. Any device that report information to homeassistant by mqtt protocol have this future problem. Now is only a advertise.

in this post they expain better than me :-)

https://community.home-assistant.io/t/psa-mqtt-name-changes-in-2023-8/598099

LordMike commented 1 year ago

I added device names as prefixes because it's my opinion that "sensor.ph" is useless .. but I guess they will add it themselves?

If so, I'll have to make an update that changes the "unique_id" - I hope it won't break everything :|

Oh - and this is the correct repo. Hass-addons repo is purely for the addon.

LordMike commented 1 year ago

A bit more docs are here: https://www.home-assistant.io/blog/2023/08/02/release-20238/#breaking-changes

Expanding the "MQTT" accordion will show notes on the name changes.

LordMike commented 1 year ago

I've pushed an update, 0.15.0 - try it out and let me know.

gllmlbrt commented 1 year ago

I've pushed an update, 0.15.0 - try it out and let me know.

Hey, I deleted all the entities/devices, stopped the add-on, updated and restarted. Naturally it found all the deveices and recreated the devices and entitites in Hass, but they are the same entities names, therefore same alert. So: A. whatever you edited did not break anything. Still works as before. B. Did not resolve the naming warning from Hass/MQTT.

The entities have unique IDs, which among other things allow to change many things from the UI like icon, decimals names etc..

I was thinking you could add a prefix directly in the creation of the entity. Granted that sensor.ph woudl be useless. Right now it is sensor.pool_ph which trigger the warrning because "pool" is the name of the device as well. To remove the warning and resolve the 2024.02 ultimatum, would be to have it as sensor.prefix_pool_ph. Prefix could be "blueriiot" ?

LordMike commented 1 year ago

That’s true. I could add a configuration element to control what the prefix should be. Weird that it didn’t remove it though - the warning is gone on my end :|

Mike.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Guillaume Albert @.> Sent: Thursday, August 10, 2023 8:35:19 AM To: LordMike/MBW.BlueRiiot2MQTT @.> Cc: Michael Bisbjerg @.>; Comment @.> Subject: Re: [LordMike/MBW.BlueRiiot2MQTT] MQTT name that starts with the device name Error in Home Assistant 2023.08 (Issue #80)

I've pushed an update, 0.15.0 - try it out and let me know.

Hey, I delevted all the entities/devices, stopped the add on, updated and restarted. Naturally it found all the deveices and recreated the devices and entitites in Hass, but they are the same entities names, therefore same alert. So: A. whatever you editied did not break anything. Still works as before B. Did not resolve the naming warning from Hass/MQTT

The entities have unique IDs, which among other things allow to change many things from the UI like icon, decimals names etc..

I was thinking you could add a prefix directly in the creation of the entity. Granted that sensor.ph woudl be useless. Right now it is sensor.pool_ph which trigger the warrning because "pool" is the name of the device as well. To remove the warning and resolve the 2024.02 ultimatum, would be to have it as sensor.prefix_pool_ph. Prefix could be "blueriiot" ?

— Reply to this email directly, view it on GitHubhttps://github.com/LordMike/MBW.BlueRiiot2MQTT/issues/80#issuecomment-1672638549, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH2YJYYXT5JWUW5EMTY3ZLXUR6KPANCNFSM6AAAAAA3CHTQNQ. You are receiving this because you commented.Message ID: @.***>

LordMike commented 1 year ago

I noticed some more entities that I'd missed, api operational and so on. Latest versions should resolve this.

I've also found on other projects that the warning does not disappear immediately, but over time. So could you check again?