Antoni-Czaplicki / vulcan-for-hassio

Vulcan inegration for home assistamt
26 stars 3 forks source link

Error while setting up vulcan platform for sensor #12

Closed Krzysiekmkg9 closed 3 years ago

Krzysiekmkg9 commented 3 years ago

Hi, I would like to use your integration but my HA gets an error when setting up Vulcan. Integration was installed by HACS. I can set up integration but after it, I don't get any entities, and in the logs, I have this information

Logger: homeassistant.components.sensor
Source: custom_components/vulcan/get_data.py:127
Integration: Sensor (documentation, issues)
First occurred: 11:46:49 (1 occurrences)
Last logged: 11:46:49
Error while setting up vulcan platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/vulcan/sensor.py", line 44, in async_setup_entry
    hass.data[DOMAIN]["grade"] = await get_latest_grade(
  File "/config/custom_components/vulcan/get_data.py", line 127, in get_latest_grade
    async for grade in await client.data.get_grades():
  File "/usr/local/lib/python3.8/site-packages/vulcan/data/_grade.py", line 117, in get
    yield Grade.load(grade)
  File "/usr/local/lib/python3.8/site-packages/vulcan/model/_serializable.py", line 49, in load
    return to_model(cls, data)
  File "/usr/local/lib/python3.8/site-packages/related/functions.py", line 104, in to_model
    value = cls(**value)
  File "<attrs generated init vulcan.data._grade.Grade>", line 12, in __init__
    _setattr('column', __attr_converter_column(column))
  File "/usr/local/lib/python3.8/site-packages/related/converters.py", line 40, in __call__
    return to_model(self.cls, value)
  File "/usr/local/lib/python3.8/site-packages/related/functions.py", line 104, in to_model
    value = cls(**value)
  File "<attrs generated init vulcan.data._grade.GradeColumn>", line 20, in __init__
    __attr_validator_group(self, __attr_group, self.group)
  File "/usr/local/lib/python3.8/site-packages/attr/validators.py", line 35, in __call__
    raise TypeError(
TypeError: ("'group' must be (<class 'str'>,) (got None that is a <class 'NoneType'>).", Attribute(name='group', default=NOTHING, validator=<instance_of validator for type (<class 'str'>,)>, repr=True, eq=True, order=True, hash=None, init=True, metadata=mappingproxy({'key': 'Group'}), type=<class 'str'>, converter=<function str_if_not_none at 0x7fad6ac71ca0>, kw_only=False), (<class 'str'>,), None)
Antoni-Czaplicki commented 3 years ago

This is a known issue but has already been fixed - we are currently waiting for a new version of the API to be released.

Antoni-Czaplicki commented 3 years ago

Please try to update to latest version