diff --git a/lnxlink/__main__.py b/lnxlink/__main__.py index 880c24d..28eca35 100755 --- a/lnxlink/__main__.py +++ b/lnxlink/__main__.py @@ -151,7 +151,8 @@ def setup_discovery_monitoring(self, addon, service, discovery_template): discovery['name'] = addon.name.lower().replace(' ', '_') discovery['unique_id'] = f"{self.config['mqtt']['clientId']}_{service}" discovery['state_topic'] = topic - discovery['json_attributes_topic'] = topic + if addon.getInfo.__annotations__.get('return') == dict: + discovery['json_attributes_topic'] = topic discovery['icon'] = addon.icon discovery['unit_of_measurement'] = addon.unit if hasattr(addon, 'device_class'): diff --git a/lnxlink/modules/media.py b/lnxlink/modules/media.py index 9660cc5..c2c8b5e 100644 --- a/lnxlink/modules/media.py +++ b/lnxlink/modules/media.py @@ -52,7 +52,7 @@ def startControl(self, topic, data): if len(self.players) > 0: self.players[0]['player'].Next() - def getInfo(self): + def getInfo(self) -> dict: self.__getPlayers() info = { 'title': '', diff --git a/pyproject.toml b/pyproject.toml index 2bf6911..e44dae6 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "lnxlink" -version = "2022.12.0" +version = "2023.1.0" description = "Internet Of Things (IOT) integration with Linux using MQTT" readme = "README.md" keywords = ["lnxlink"]