mletenay / home-assistant-goodwe-inverter

Experimental version of Home Assistant integration for Goodwe solar inverters
https://discord.gg/TaXyWXT
MIT License
146 stars 38 forks source link

float() argument must be a string or a real number, not 'NoneType' #180

Closed ghost closed 1 year ago

ghost commented 1 year ago

my goodwe SBP inverter logs this error in the logs.. a None must be getting returned and the code is trying to convert it to a float value.. guessing some extra code IF's might be needed to prevent the error :)

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/goodwe/number.py", line 145, in async_setup_entry
    InverterNumberEntity(device_info, description, inverter, current_value)
  File "/config/custom_components/goodwe/number.py", line 168, in __init__
    self._attr_native_value = float(current_value)
TypeError: float() argument must be a string or a real number, not 'NoneType'
mletenay commented 1 year ago

Fixed in v0.9.9.11