HASwitchPlate / openHASP-custom-component

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

Setup failed for custom integration openhasp #109

Closed gromitn closed 7 months ago

gromitn commented 1 year ago

Hi

I have just upgraded to HA Operating System 10.2 (from 10.1) and HA started I get:

Logger: homeassistant.setup
Source: setup.py:214
First occurred: 9:04:20 AM (1 occurrences)
Last logged: 9:04:20 AM

Setup failed for custom integration openhasp: Unable to import component: Exception importing custom_components.openhasp

I cannot restart HA as it fails the config check:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/__init__.py:563
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:07:06 AM (1 occurrences)
Last logged: 9:07:06 AM

[140586943335056] The system cannot restart because the configuration is not valid: Component error: openhasp - Exception importing custom_components.openhasp
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 563, in async_handle_core_service
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Component error: openhasp - Exception importing custom_components.openhasp

How do I go about fault finding this?

I have disabled openHASP in the integrations, but this hasn't helped.

Appreciate any pointers!!

ziocharly commented 1 year ago

Problem also here: after HA 10.2 update, the openHASP integration (0.7.0) do not discover anymore my openHasp device (WT32-SC01 - V.0.6.3)... Do you have any solutions ?

fvanroie commented 1 year ago

Do you have any solutions ?

Update the device to v0.7.0 or downgrade the integration to 0.6.6... Both need to be on the same version level.

gromitn commented 1 year ago

If I have disabled openHASP, can I safely ignore the config check and force a HA restart?

Edit: I just commented out all openHASP in the config file (easy as I just did the whole file - i.e, #openhasp: !include openhasp.yaml) Was then able to pass the config check for a much needed (for other reasons) restart.

What is the long term fix - wait on a new iteration of the integration? I'm currently only at the tinker/project stage of openHASP - so not critical.

fvanroie commented 1 year ago

It seems you have a yaml error in openhasp.yaml. The Custom Component works fine with HA 10.2 here.

fvanroie commented 7 months ago

We added a Pre-Release 0.7.2 with support for HA 2024.1. Please help test it before release by redownloading this version of the Custom Component in HACS.