AirBeeSee / FiatUconnect

FIAT (uconnect) Home Assistant Addon
MIT License
4 stars 2 forks source link

ModelDescription breaks Home Assistant topic structure #3

Open maxarndt opened 1 year ago

maxarndt commented 1 year ago

Hi @AirBeeSee,

the last release (v12) breaks the HA topic structure, at least for certain models. In the case of my Fiat 500e the ModelDescription equals Neuer 500 which contains a space. This breaks the topic structure and mqtt discovery of the device/entity fails:

Logger: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:114
Integration: MQTT (documentation, issues)
First occurred: 17:19:07 (272 occurrences)
Last logged: 17:23:14

Received message on illegal discovery topic 'homeassistant/button/fiat_uconnect/SOMEVIN000_Neuer 500_UpdateLocation/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/button/fiat_uconnect/SOMEVIN000_Neuer 500_DoorLock/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/button/fiat_uconnect/SOMEVIN000_Neuer 500_DoorUnLock/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/button/fiat_uconnect/SOMEVIN000_Neuer 500_FetchNow/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic
Received message on illegal discovery topic 'homeassistant/sensor/fiat_uconnect/SOMEVIN000_Neuer 500_LastUpdate/config'. The topic contains not allowed characters. For more information see https://www.home-assistant.io/integrations/mqtt/#discovery-topic

What about using your haDevice.Name instead and replace not allowed characters to be safe here?

AirBeeSee commented 1 year ago

12.1.0 - 2023-08-04 : remove suffix "vehicle.ModelDescription"