mdegat01 / addon-amr2mqtt

HA Addon which runs rtlamr to read IDM power meter data and send to MQTT broker
MIT License
33 stars 15 forks source link

MQTT discovery messages need to be updated for new Home Assistant #97

Closed agoode closed 10 months ago

agoode commented 1 year ago

Describe the bug Home Assistant now prints this warning in the UI:

This stops working in version 2024.2.0. Please address before upgrading.

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 of 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.

List of affected entities:

To Reproduce

Look at logs in Home Assistant.

Expected behavior

This warning isn't present.

Logs

MQTT entity name starts with the device name in your config {'enabled_by_default': False, 'name': 'Gas Meter Protocol ID', 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, 'unique_id': 'amr2mqtt_xx_ProtocolID', 'value_template': Template<template=({{ value_json.ProtocolID }}) renders=0>, 'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>, 'availability': [{'topic': 'amr2mqtt/bridge/state', 'payload_available': 'online', 'payload_not_available': 'offline'}], 'device': {'identifiers': ['amr2mqtt_xx'], 'name': 'Gas Meter', 'sw_version': '2.1.2', 'via_device': 'AMR2MQTT', 'connections': []}, 'state_topic': 'amr2mqtt/xx', 'qos': 0, 'payload_not_available': 'offline', 'availability_mode': 'latest', 'encoding': 'utf-8', 'payload_available': 'online', 'force_update': False}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Protocol ID'

Environment (please complete the following information):

Additional context

https://community.home-assistant.io/t/psa-mqtt-name-changes-in-2023-8/598099

I'm guessing the fix involves removing most of the {device_name} prefixes in amr2mqtt.py.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

agoode commented 1 year ago

Yes, this is still an issue.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

benklop commented 12 months ago

still an issue.

github-actions[bot] commented 11 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!