tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
603 stars 106 forks source link

Bug: HA >2023.8.0 reports "MQTT entity name starts with the device name in your config" #699

Closed ScrewLooseDan closed 1 year ago

ScrewLooseDan commented 1 year ago

Describe the Bug

Since HA 2023.8.0, there is an error logged for most (all?) my ring-mqtt devices.

Steps to Reproduce

Start HA 2023.8.0 with ring-mqtt devices

Expected Behavior

No log messages

Log Output

This is all the logs for one of my devices (a contact sensor), other devices have similar entries.

2023-08-04 15:53:17.867 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'name': 'Garage Door Info', 'unique_id': '55012924-2a42-4c85-95d0-0463c87928f0_info', 'state_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/info/state', 'value_template': Template<template=({{ value_json["commStatus"] | default("") }}) renders=0>, 'json_attributes_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/info/state', 'icon': 'mdi:information-outline', 'availability_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'device': {'identifiers': ['55012924-2a42-4c85-95d0-0463c87928f0'], 'name': 'Garage Door', 'manufacturer': 'Ring', 'model': 'Contact Sensor', 'connections': []}, 'availability_mode': 'latest', 'enabled_by_default': True, 'qos': 0, 'force_update': False, 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Info'
2023-08-04 15:53:17.868 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'name': 'Garage Door Battery', 'unique_id': '55012924-2a42-4c85-95d0-0463c87928f0_battery', 'state_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/info/state', 'device_class': <SensorDeviceClass.BATTERY: 'battery'>, 'unit_of_measurement': '%', 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, 'value_template': Template<template=({{ value_json["batteryLevel"] | default("") }}) renders=0>, 'json_attributes_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/battery/attributes', 'availability_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'device': {'identifiers': ['55012924-2a42-4c85-95d0-0463c87928f0'], 'name': 'Garage Door', 'manufacturer': 'Ring', 'model': 'Contact Sensor', 'connections': []}, 'availability_mode': 'latest', 'enabled_by_default': True, 'qos': 0, 'force_update': False, 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Battery'
2023-08-04 15:53:17.869 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'name': 'Garage Door Tamper', 'unique_id': '55012924-2a42-4c85-95d0-0463c87928f0_tamper', 'state_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/info/state', 'device_class': <BinarySensorDeviceClass.TAMPER: 'tamper'>, 'value_template': Template<template=({% if value_json["tamperStatus"] is equalto "tamper" %} ON {% else %} OFF {% endif %}) renders=0>, 'availability_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'device': {'identifiers': ['55012924-2a42-4c85-95d0-0463c87928f0'], 'name': 'Garage Door', 'manufacturer': 'Ring', 'model': 'Contact Sensor', 'connections': []}, 'payload_on': 'ON', 'availability_mode': 'latest', 'enabled_by_default': True, 'qos': 0, 'force_update': False, 'payload_off': 'OFF', 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Tamper'
2023-08-04 15:53:17.870 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT device name is equal to entity name in your config {'name': 'Garage Door', 'unique_id': '55012924-2a42-4c85-95d0-0463c87928f0', 'state_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/contact/state', 'device_class': <BinarySensorDeviceClass.DOOR: 'door'>, 'availability_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'device': {'identifiers': ['55012924-2a42-4c85-95d0-0463c87928f0'], 'name': 'Garage Door', 'manufacturer': 'Ring', 'model': 'Contact Sensor', 'connections': []}, 'payload_on': 'ON', 'availability_mode': 'latest', 'enabled_by_default': True, 'qos': 0, 'force_update': False, 'payload_off': 'OFF', 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The entity name will be set to `null`
2023-08-04 15:53:17.871 WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'name': 'Garage Door Bypass Mode', 'unique_id': '55012924-2a42-4c85-95d0-0463c87928f0_bypass_mode', 'state_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/bypass_mode/state', 'command_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/bypass_mode/command', 'options': ['Never', 'Faulted', 'Always'], 'availability_topic': 'ring/dr4kek-1d8vu-0/alarm/55012924-2a42-4c85-95d0-0463c87928f0/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'device': {'identifiers': ['55012924-2a42-4c85-95d0-0463c87928f0'], 'name': 'Garage Door', 'manufacturer': 'Ring', 'model': 'Contact Sensor', 'connections': []}, 'retain': False, 'availability_mode': 'latest', 'enabled_by_default': True, 'optimistic': False, 'qos': 0, 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Bypass Mode'

Screenshots

No response

Config File

{
    "mqtt_url": "mqtt://user:pass@mqttserver:1883",
    "mqtt_options": "",
    "livestream_user": "",
    "livestream_pass": "",
    "disarm_code": "",
    "enable_cameras": false,
    "enable_modes": false,
    "enable_panic": false,
    "hass_topic": "homeassistant/status",
    "ring_topic": "ring",
    "location_ids": []
}

Install Type

Docker

Version

v5.5.1

Operating System

Synology

Architecture

linux / amd64

Machine Details

Docker running on Synology

tsightler commented 1 year ago

Already discussed here https://github.com/tsightler/ring-mqtt/discussions/698

This is due to an unannounced change in HA (well, they claim releasing is an "announcement" since it doesn't break anything just creates these warnings, I have a strongly differing opinion). You can safely ignore them for now. I'll maybe promote that discussion to an issue.

tsightler commented 1 year ago

New issue for tracking is https://github.com/tsightler/ring-mqtt/issues/700

ScrewLooseDan commented 1 year ago

Sorry for the duplicate, I really did look before starting this one (thought it odd I was the first to report).

Much appreciate you being on top of this and continuing to maintain this project.

tsightler commented 1 year ago

It's not a problem, I can understand why you might not see it since it was still in the discussion thread vs here.