Patrick762 / hassio-bluetti-bt

Bluetti Integration for Home Assistant
MIT License
47 stars 14 forks source link

[Bug]: Integration stop working #115

Open Kathou99 opened 3 months ago

Kathou99 commented 3 months ago

What happened?

All the data was unavailable so I deleted the bluetti AC200L from HA and I try to re-add to see if it is working but it's seem it's not doing anythings

What version of our software are you running?

0.1.1

What device are you seeing the problem on?

All device

What bluetooth connection are you using?

USB dongle

Have you changed the integration settings?

false

Integration settings (if you changed them)

No response

Relevant log output

Unexpected error fetching Bluetti polling coordinator data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/coordinator.py", line 78, in _async_update_data
    return await self.reader.read_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/bluetooth/device_reader.py", line 91, in read_data
    parsed = self.bluetti_device.parse(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/base_devices/BluettiDevice.py", line 20, in parse
    return self.struct.parse(address, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/utils/struct.py", line 199, in parse
    val = f.parse(field_data)
          ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/bluetti_bt/bluetti_bt_lib/utils/struct.py", line 94, in parse
    return (val / 10 ** self.scale) * self.multiplier
           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'decimal.Decimal' and 'float'
JimmyPhones commented 3 months ago

Yup getting the same error

2024-06-23 11:54:55.993 ERROR (MainThread) [custom_components.bluetti_bt.coordinator] Unexpected error fetching Bluetti polling coordinator data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bluetti_bt/coordinator.py", line 78, in _async_update_data return await self.reader.read_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bluetti_bt/bluetti_bt_lib/bluetooth/device_reader.py", line 91, in read_data parsed = self.bluetti_device.parse( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bluetti_bt/bluetti_bt_lib/base_devices/BluettiDevice.py", line 20, in parse return self.struct.parse(address, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bluetti_bt/bluetti_bt_lib/utils/struct.py", line 199, in parse val = f.parse(field_data) ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bluetti_bt/bluetti_bt_lib/utils/struct.py", line 94, in parse return (val / 10 * self.scale) self.multiplier


TypeError: unsupported operand type(s) for *: 'decimal.Decimal' and 'float'
rotx commented 3 months ago

117

Patrick762 commented 3 months ago

Pull request merged and available in 0.1.2