From 07dafd058166d6334f45f81b34efd3b119e7545e Mon Sep 17 00:00:00 2001 From: Sean Kinsey Date: Tue, 10 Dec 2024 15:44:48 -0800 Subject: [PATCH] - Add the product type to the name when the actual product name is unknown --- CHANGELOG.md | 3 +++ setup.cfg | 2 +- src/avionmqtt/__init__.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5315593..0d368cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,3 +22,6 @@ Added several small improvements, leaving the package in a reasonable usable sta ## 1.3.4 2024-12-09 - Remove use of retained messages and subcribe to Home Assistant's birth message instead + +## 1.3.6 2024-12-09 +- Add the product type to the name when the actual product name is unknown \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index e9a6717..8d1daf3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = avionmqtt -version = 1.3.5 +version = 1.3.6 author = Sean Kinsey author_email = oyvind@kinsey.no description = A python library to bridge between Avi-on based lights and Home Assistant using MQTT diff --git a/src/avionmqtt/__init__.py b/src/avionmqtt/__init__.py index e43d8a8..31641b2 100644 --- a/src/avionmqtt/__init__.py +++ b/src/avionmqtt/__init__.py @@ -119,7 +119,7 @@ async def mqtt_register(mqtt: aiomqtt.Client, entity: dict): "identifiers": [pid], "name": name, "manufacturer": "Avi-on", - "model": PRODUCT_NAMES.get(product_id, "Unknown"), + "model": PRODUCT_NAMES.get(product_id, f"Unknown product ({product_id})"), "serial_number": pid, }, }