HASwitchPlate / openHASP-custom-component

Home Assistant custom component for openHASP
https://www.openhasp.com
MIT License
49 stars 9 forks source link

Binary Sensors discovery crashes #107

Closed WAPEETY closed 1 year ago

WAPEETY commented 1 year ago

Version of the custom_component

0.6.6

Configuration


Add your config here.

Describe the bug

Discovering a device with a binary sensor attached the discovery process crashes in that point resulting no binary_sensor added

Debug log

2023-02-13 14:05:06.256 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up openhasp platform for binary_sensor
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/openhasp/binary_sensor.py", line 34, in async_setup_entry
    [
  File "/config/custom_components/openhasp/binary_sensor.py", line 35, in <listcomp>
    HASPBinarySensor(
  File "/config/custom_components/openhasp/binary_sensor.py", line 58, in __init__
    self._attr_name = f"{name} binary_sensor {self._gpio}"
AttributeError: 'HASPBinarySensor' object has no attribute '_gpio'
dgomes commented 1 year ago

Please update to 0.7.0 version

WAPEETY commented 1 year ago

isn't it still in beta?

dgomes commented 1 year ago

Already released 😬

WAPEETY commented 1 year ago

I close as this has been fixed in 0.7.0