Remove repair issue for MQTT discovered items (#98768)
parent
3eb2b7010d
commit
c39fc0766e
|
@ -1144,11 +1144,8 @@ class MqttEntity(
|
||||||
)
|
)
|
||||||
elif (device_name := config[CONF_DEVICE][CONF_NAME]) == entity_name:
|
elif (device_name := config[CONF_DEVICE][CONF_NAME]) == entity_name:
|
||||||
self._attr_name = None
|
self._attr_name = None
|
||||||
self._issue_key = (
|
if not self._discovery:
|
||||||
"entity_name_is_device_name_discovery"
|
self._issue_key = "entity_name_is_device_name_yaml"
|
||||||
if self._discovery
|
|
||||||
else "entity_name_is_device_name_yaml"
|
|
||||||
)
|
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"MQTT device name is equal to entity name in your config %s, "
|
"MQTT device name is equal to entity name in your config %s, "
|
||||||
"this is not expected. Please correct your configuration. "
|
"this is not expected. Please correct your configuration. "
|
||||||
|
@ -1162,11 +1159,8 @@ class MqttEntity(
|
||||||
if device_name[:1].isupper():
|
if device_name[:1].isupper():
|
||||||
# Ensure a capital if the device name first char is a capital
|
# Ensure a capital if the device name first char is a capital
|
||||||
new_entity_name = new_entity_name[:1].upper() + new_entity_name[1:]
|
new_entity_name = new_entity_name[:1].upper() + new_entity_name[1:]
|
||||||
self._issue_key = (
|
if not self._discovery:
|
||||||
"entity_name_startswith_device_name_discovery"
|
self._issue_key = "entity_name_startswith_device_name_yaml"
|
||||||
if self._discovery
|
|
||||||
else "entity_name_startswith_device_name_yaml"
|
|
||||||
)
|
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"MQTT entity name starts with the device name in your config %s, "
|
"MQTT entity name starts with the device name in your config %s, "
|
||||||
"this is not expected. Please correct your configuration. "
|
"this is not expected. Please correct your configuration. "
|
||||||
|
|
|
@ -15,14 +15,6 @@
|
||||||
"entity_name_startswith_device_name_yaml": {
|
"entity_name_startswith_device_name_yaml": {
|
||||||
"title": "Manual configured MQTT entities with a name that starts with the device name",
|
"title": "Manual configured MQTT entities with a name that starts with the device name",
|
||||||
"description": "Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped off the entity name as a work-a-round. Please update your configuration and restart Home Assistant to fix this issue. \n\nList of affected entities:\n\n{config}"
|
"description": "Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped off the entity name as a work-a-round. Please update your configuration and restart Home Assistant to fix this issue. \n\nList of affected entities:\n\n{config}"
|
||||||
},
|
|
||||||
"entity_name_is_device_name_discovery": {
|
|
||||||
"title": "Discovered MQTT entities with a name that is equal to the device name",
|
|
||||||
"description": "Some MQTT entities have an entity name equal to the device name. This is not expected. The entity name is set to `null` as a work-a-round to avoid a duplicate name. Please inform the maintainer of the software application that supplies the affected entities to fix this issue.\n\nList of affected entities:\n\n{config}"
|
|
||||||
},
|
|
||||||
"entity_name_startswith_device_name_discovery": {
|
|
||||||
"title": "Discovered entities with a name that starts with the device name",
|
|
||||||
"description": "Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped off the entity name as a work-a-round. Please inform the maintainer of the software application that supplies the affected entities to fix this issue. \n\nList of affected entities:\n\n{config}"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|
Loading…
Reference in New Issue