bigmoby / fglair_for_homeassistant

❄️ FGLair heat pump controller integration
MIT License
48 stars 4 forks source link

Broken after last update (v0.3.15) #156

Closed jarube closed 1 month ago

jarube commented 1 month ago

System Health details

System Information

version core-2024.7.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.33-haos
arch x86_64
timezone Europe/Amsterdam
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 2098 Installed Version | 1.34.0 Stage | running Available Repositories | 1392 Downloaded Repositories | 64
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 28 september 2024 om 02:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | true remote_server | eu-central-1-11.ui.nabu.casa certificate_status | ready instance_id | aa81d70566a04562b0e4b77ca95b3d91 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 58.4 GB disk_used | 43.8 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | vmware board | ova supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (18.0.0), Studio Code Server (5.15.0), Samba share (12.3.2), SQLite Web (4.2.0), Z-Wave JS (0.6.2), Mosquitto broker (6.4.1), Hass Calendar Addon (0.501), ESPHome (2024.7.3), Music Assistant Server (2.1.1)
Dashboards dashboards | 4 -- | -- resources | 41 views | 27 mode | storage
Recorder oldest_recorder_run | 24 juli 2024 om 13:23 -- | -- current_recorder_run | 4 augustus 2024 om 13:03 estimated_db_size | 8689.62 MiB database_engine | sqlite database_version | 3.45.3
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

After updating to v0.3.15, the integration was broken, I gave the message "setup failed". airco

I tried the following:

All with same result: "setup failed".

Reproduction steps

installed latest update and there is was

Debug logs

I share the following cause I think the issue is there where the syntax error is mentioned.

Logger: homeassistant.config_entries
Bron: config_entries.py:586
Eerst voorgekomen: 13:16:37 (2 gebeurtenissen)
Laatst gelogd: 13:17:35

Error setting up entry xxxxxxxxx for fglair_heatpump_controller
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/fglair_heatpump_controller/climate.py", line 43, in <module>
    from pyfujitsugeneral.splitAC import SplitAC, get_prop_from_json
  File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 22
    if not isinstance(property_item, dict)
                                          ^
SyntaxError: expected ':'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/fglair_heatpump_controller/__init__.py", line 47, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2046, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1284, in _load_platform
    raise ImportError(
ImportError: Exception importing custom_components.fglair_heatpump_controller.climate

Diagnostics dump

No response

jarube commented 1 month ago

airco2 Just did a roleback to v0.3.14 and everything is working great.

bigmoby commented 1 month ago

I'm so sorry guys😓I'll fix asap the library! @drc38 I think it's caused by your PR, I'll fix it

bigmoby commented 1 month ago

@jarube please try with version https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.16 Sorry again :-(

jarube commented 1 month ago

Many thanks, it's fixed!

drc38 commented 1 month ago

Sorry not sure why the : got left off. @bigmoby adding CI to the repo eg https://github.com/hardbyte/python-evnex/blob/main/.github/workflows/ci.yml could be worthwhile

bigmoby commented 1 month ago

@drc38 no problem at all for the typo!🙌 Good point for CI check process 👍