From 8e4e491c330d356e017d6c82c01d044bd5dbedbe Mon Sep 17 00:00:00 2001 From: Andre Basche Date: Tue, 25 Apr 2023 23:39:18 +0200 Subject: [PATCH] Output pyhon version --- custom_components/hon/button.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/hon/button.py b/custom_components/hon/button.py index 2227f58..79759b5 100644 --- a/custom_components/hon/button.py +++ b/custom_components/hon/button.py @@ -2,6 +2,7 @@ import logging import urllib from urllib.parse import quote +import pkg_resources from homeassistant.components.button import ButtonEntityDescription, ButtonEntity from homeassistant.config_entries import ConfigEntry from pyhon import Hon @@ -76,4 +77,6 @@ class HonFeatureRequestButton(HonEntity, ButtonEntity): self._attr_entity_registry_enabled_default = False async def async_press(self) -> None: - _LOGGER.error("Device Info:\n" + self._device.diagnose) + pyhon_version = pkg_resources.get_distribution("pyhon").version + info = f"Device Info:\n{self._device.diagnose}pyhOnVersion: {pyhon_version}" + _LOGGER.error(info)