fl4p / batmon-ha

Add-on for Home Assistant to connect JK, JBD, Daly, ANT, SOK and Supervolt BMS via Bluetooth
MIT License
246 stars 53 forks source link

Warning `MQTT entity name starts with the device name in your config` #142

Closed 7wells closed 9 months ago

7wells commented 9 months ago

Hi Fabian!

I see this warning in the logs but am unsure if I as user can solve the problem, or if you as author of the batmon-ha addon can do something about it:

Logger: homeassistant.components.mqtt.mixins
Source: components/mqtt/mixins.py:296
Integration: MQTT (documentation, issues)
First occurred: 13:53:34 (4 occurrences)
Last logged: 13:53:34

MQTT entity name starts with the device name in your config {'unique_id': 'rv_battery__switch_discharge', 'name': 'rv_battery discharge', 'device_class': <SwitchDeviceClass.OUTLET: 'outlet'>, 'state_topic': 'rv_battery/switch/discharge', 'device': {'identifiers': ['rv_battery'], 'name': 'rv_battery', 'connections': []}, 'command_topic': 'homeassistant/switch/rv_battery/discharge/set', 'retain': False, 'payload_available': 'online', 'enabled_by_default': True, 'optimistic': False, 'payload_off': 'OFF', 'encoding': 'utf-8', 'payload_on': 'ON', 'payload_not_available': 'offline', 'qos': 0, 'availability_mode': 'latest'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'discharge'
MQTT entity name starts with the device name in your config {'unique_id': 'rv_battery__switch_discharge', 'name': 'rv_battery discharge switch', 'device_class': <BinarySensorDeviceClass.POWER: 'power'>, 'expire_after': 20, 'device': {'identifiers': ['rv_battery'], 'name': 'rv_battery', 'connections': []}, 'state_topic': 'rv_battery/switch/discharge', 'payload_available': 'online', 'enabled_by_default': True, 'force_update': False, 'payload_off': 'OFF', 'encoding': 'utf-8', 'payload_on': 'ON', 'payload_not_available': 'offline', 'qos': 0, 'availability_mode': 'latest'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'discharge switch'
MQTT entity name starts with the device name in your config {'unique_id': 'rv_battery__switch_charge', 'name': 'rv_battery charge', 'device_class': <SwitchDeviceClass.OUTLET: 'outlet'>, 'state_topic': 'rv_battery/switch/charge', 'device': {'identifiers': ['rv_battery'], 'name': 'rv_battery', 'connections': []}, 'command_topic': 'homeassistant/switch/rv_battery/charge/set', 'retain': False, 'payload_available': 'online', 'enabled_by_default': True, 'optimistic': False, 'payload_off': 'OFF', 'encoding': 'utf-8', 'payload_on': 'ON', 'payload_not_available': 'offline', 'qos': 0, 'availability_mode': 'latest'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'charge'
MQTT entity name starts with the device name in your config {'unique_id': 'rv_battery__switch_charge', 'name': 'rv_battery charge switch', 'device_class': <BinarySensorDeviceClass.POWER: 'power'>, 'expire_after': 20, 'device': {'identifiers': ['rv_battery'], 'name': 'rv_battery', 'connections': []}, 'state_topic': 'rv_battery/switch/charge', 'payload_available': 'online', 'enabled_by_default': True, 'force_update': False, 'payload_off': 'OFF', 'encoding': 'utf-8', 'payload_on': 'ON', 'payload_not_available': 'offline', 'qos': 0, 'availability_mode': 'latest'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'charge switch'

I have not changed anything in my HA settings around the time of the occurrence of these warnings; therefore, I'm a bit puzzled about what has triggered them now.

If you need more information from me, please let me know. If this is not related to your addon, then please accept my apologies for mentioning it here; maybe you could then nudge me into the right direction where to look further?

Anyway, thank you so much! 👍

fl4p commented 9 months ago

ill see what i can do, thanks

fl4p commented 9 months ago

fill be fixed with next release

fl4p commented 9 months ago

re-open if needed