lanrat / homeplate

Home Assistant E-Ink Dashboard on the Inkplate 10

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MQTT Entity Names include Device Name

ajwells256 opened this issue · comments

I've noticed some warning logs (see below) in the Home Assistant logs. I've identified the root cause as this line: https://github.com/lanrat/homeplate/blob/191fc8b007c00d2e3723af7ffd220de82d0ac7cb/src/mqtt.cpp#L14C9-L14C18

I think mqtt_name doesn't serve a purpose, usages of it should be removed and the names should be passed directly into the mqtt StaticJsonDocument without prepending the device name.

2023-10-27 11:48:40.373 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'unique_id': 'homeplate_activity_count', 'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>, 'name': 'HomePlate Activity Count', 'state_topic': 'homeassistant/sensor/homeplate/boot/state', 'unit_of_measurement': 'activities', 'icon': 'mdi:chart-line-variant', 'value_template': Template<template=({{ value_json.activity_count }}) renders=0>, 'expire_after': 3600, 'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>, 'enabled_by_default': False, 'device': {'manufacturer': 'e-radionica', 'model': 'Inkplate 10', 'name': 'HomePlate', 'sw_version': 'Oct 15 2023, 20:28:10', 'identifiers': ['homeplate', '9C:9C:1F:F3:2F:84'], 'connections': []}, 'force_update': False, 'payload_available': 'online', 'encoding': 'utf-8', 'availability_mode': 'latest', 'qos': 0, 'payload_not_available': 'offline'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Activity Count'