Closed kquinsland closed 2 years ago
I tested this setup and I have the same issue. In the log file I see this error:
2022-04-15 21:04:35 ERROR (MainThread) [homeassistant.components.switch] Error while setting up openhasp platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/openhasp/switch.py", line 35, in async_setup_entry
[
File "/config/custom_components/openhasp/switch.py", line 36, in <listcomp>
HASPSwitch(
File "/config/custom_components/openhasp/switch.py", line 62, in __init__
self._attr_name = f"{name} switch {self._gpio}"
AttributeError: 'HASPSwitch' object has no attribute '_gpio'
pushed a commit that should fix this
I removed the plate, updated the CC, rediscovered the plate and now it's OK
Version of the custom_component
The latest as of yesterday. HACS prompted me to update on 2022.04.14.
Configuration
Describe the bug
I have a L8 3 relay variant. Two of the three relays are configured as "light" and one as "power":
The custom component does configure the
light.....
entities in HA, but there is no switch for the power relay. I have been able to confirm the correct GPIO in the discovery payload: