xraver / mercedes_me_api

Script to use Mercedes Me APIs.
MIT License
57 stars 14 forks source link

Fixed "maximum recursion depth exceeded" issue in custom component #8

Closed robertklep closed 3 years ago

robertklep commented 3 years ago

This fixes a RecursionError in the custom component.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 374, in _async_add_entity
    suggested_object_id = entity.name
  File "/config/custom_components/mercedesmeapi/resources.py", line 74, in name
    return f"{self._vin}_{self.name}"
  File "/config/custom_components/mercedesmeapi/resources.py", line 74, in name
    return f"{self._vin}_{self.name}"
  File "/config/custom_components/mercedesmeapi/resources.py", line 74, in name
    return f"{self._vin}_{self.name}"
  [Previous line repeated 986 more times]
RecursionError: maximum recursion depth exceeded
xraver commented 3 years ago

Thank you so much!