BenPru / luxtronik

Luxtronik integration for Home Assistant
MIT License
68 stars 23 forks source link

Error on startup with non-numeric version string #104

Closed mtdcr closed 10 months ago

mtdcr commented 1 year ago

With a Buderus heat pump with firmware version 1.62B, the following error occurs on startup:

2023-05-13 14:51:39.916 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up luxtronik2 platform for sensor
Traceback (most recent call last):
  File "[...]/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "[...]/luxtronik2/sensor.py", line 654, in async_setup_entry
    add_sensor_if_min_minor_version(luxtronik, entities, 88, LuxtronikSensor(
  File "[...]/luxtronik2/sensor.py", line 1199, in add_sensor_if_min_minor_version
    if luxtronik.firmware_version_minor >= min_minor:
  File "[...]/luxtronik2/luxtronik_device.py", line 120, in firmware_version_minor
    return int(ver.split('.')[1])
ValueError: invalid literal for int() with base 10: '62B'