From 475a27de68f08e5f4dacb967d2ab7cd4e6bc5741 Mon Sep 17 00:00:00 2001 From: patman15 <14628713+patman15@users.noreply.github.com> Date: Tue, 9 Apr 2024 21:34:38 +0200 Subject: [PATCH] added missing data types --- custom_components/bms_ble/coordinator.py | 4 ++-- custom_components/bms_ble/manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom_components/bms_ble/coordinator.py b/custom_components/bms_ble/coordinator.py index 1795055..9544b8f 100644 --- a/custom_components/bms_ble/coordinator.py +++ b/custom_components/bms_ble/coordinator.py @@ -60,11 +60,11 @@ async def stop(self): LOGGER.debug(f"Stopping device {self.device_info.get(ATTR_NAME)}") await self._device.disconnect() - async def _async_update_data(self) -> dict[str, float]: + async def _async_update_data(self) -> dict[str, int | float | bool]: """Return the latest data from the device.""" LOGGER.debug(f"BMS {self.device_info.get(ATTR_NAME)} data update") - battery_info: dict[str, float] = {} + battery_info: dict[str, int | float | bool] = {} try: battery_info.update(await self._device.async_update()) except TimeoutError: diff --git a/custom_components/bms_ble/manifest.json b/custom_components/bms_ble/manifest.json index caa1f92..5509a42 100644 --- a/custom_components/bms_ble/manifest.json +++ b/custom_components/bms_ble/manifest.json @@ -18,5 +18,5 @@ "issue_tracker": "https://github.com/patman15/BLE_BMS-HA/issues", "loggers": ["bms_ble", "ogt_bms"], "requirements": [], - "version": "1.1.1" + "version": "1.1.2" }