From 3ecf0aa02aa5c3f4777edcdef4227873211a170b Mon Sep 17 00:00:00 2001 From: "Sergey V. DUDANOV" Date: Thu, 18 Jul 2024 13:47:45 +0400 Subject: [PATCH] added device info debug logging --- custom_components/ftms/__init__.py | 6 ++++++ custom_components/ftms/config_flow.py | 1 + 2 files changed, 7 insertions(+) diff --git a/custom_components/ftms/__init__.py b/custom_components/ftms/__init__.py index 340ecac..4d19421 100644 --- a/custom_components/ftms/__init__.py +++ b/custom_components/ftms/__init__.py @@ -72,6 +72,12 @@ def _on_disconnect(ftms_: pyftms.FitnessMachine) -> None: await ftms_connect(ftms) + _LOGGER.debug(f"Device Information: {ftms.device_info}") + _LOGGER.debug(f"Machine type: {ftms.machine_type!r}") + _LOGGER.debug(f"Available sensors: {ftms.available_properties}") + _LOGGER.debug(f"Supported settings: {ftms.supported_settings}") + _LOGGER.debug(f"Supported ranges: {ftms.supported_ranges}") + assert ftms.machine_type.name unique_id = "".join( diff --git a/custom_components/ftms/config_flow.py b/custom_components/ftms/config_flow.py index 4cd495f..1acf5e0 100644 --- a/custom_components/ftms/config_flow.py +++ b/custom_components/ftms/config_flow.py @@ -248,6 +248,7 @@ async def async_step_ble_request( _LOGGER.debug(f"Machine type: {self._ftms.machine_type!r}") _LOGGER.debug(f"Available sensors: {self._ftms.available_properties}") _LOGGER.debug(f"Supported settings: {self._ftms.supported_settings}") + _LOGGER.debug(f"Supported ranges: {self._ftms.supported_ranges}") _LOGGER.debug(f"Suggested sensors: {self._suggested_sensors}") return self.async_show_progress_done(next_step_id="information")