keshavdv / victron-hacs

Home Assistant plug-in for Victron Instant Readout compatible devices
46 stars 16 forks source link

SmartShunt: When setting Aux Input to Starter Battery component stops working #103

Closed bdolnik closed 8 months ago

bdolnik commented 8 months ago

Describe the bug

When enabling the Aux Input, and setting it to Starter Battery, the component stops working and starts throwing errors in the log. The error is shown below.

Debug log

2023-11-04 09:33:11.233 ERROR (MainThread) [custom_components.victron_ble] Unexpected error updating SmartShunt HQ2227UXHFM data: (<VictronSensor.STARTER_BATTERY_VOLTAGE: 'starter_battery_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 585, in async_handle_update new_data = self.update_method(update) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/victron_ble/sensor.py", line 151, in sensor_update_to_bluetooth_data_update entity_descriptions={ ^ File "/config/custom_components/victron_ble/sensor.py", line 154, in ): SENSOR_DESCRIPTIONS[ ^^^^^^^^^^^^^^^^^^^^ KeyError: (, )

heinzma commented 8 months ago

https://github.com/keshavdv/victron-hacs/pull/97 should fix it.

bdolnik commented 8 months ago

That worked for me, thank you very much.