Aohzan / ipx800v5

IPX800 V5 integration for Home-Assistant
Apache License 2.0
10 stars 0 forks source link

Erreur config_flow.py 1.4.1 #8

Closed Floche closed 1 year ago

Floche commented 1 year ago

Salut ! Merci encore pour ton super travail, globalement ca marche super bien chez moi depuis ta 1ere version. j'ai tenté de mettre à jour sur ton dernier tag 1.4.1 mais j'ai cette erreur:

ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.ipx800v5.config_flow
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 722, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 739, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/home/homeassistant/.homeassistant/custom_components/ipx800v5/config_flow.py", line 132, in <module>
    class IpxOptionsFlowHandler(config_entries.OptionsFlow):
  File "/home/homeassistant/.homeassistant/custom_components/ipx800v5/config_flow.py", line 140, in IpxOptionsFlowHandler
    self, user_input: dict[str, Any] | None = None
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'NoneType'

J'avoue être un peu ligth niveau python la.. J'ai du repasser sur le tag 1.3.0 pour ne plus avoir cette ligne 140 en erreur.

Merci encore pour ton travail

ps: j'ai une config assez complete (X4VR, X8R, XTHL, plusieurs de chaque) donc si tu veux que je fasse des tests particuliers n'hésite pas.

Aohzan commented 1 year ago

merci, je fixe ça à mon retour à partir du 24/10

Aohzan commented 1 year ago

le soucis vient de ta version de python (3.9), alors que celle dans les containers officiels est en 3.10, j'ai rollback pour corriger la compatibilité, tu peux tester la 1.4.2

Floche commented 1 year ago

En effet, je suis en version Core et pas container ni OS donc je suis resté en 3.9. Bref c'est tout bon, ca marche avec ta modif, par contre maintenant j'ai le même soucis que sur l'autre issue déjà ouverte (X4FP status..): Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.async_update_listeners() File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners update_callback() File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update self.async_write_ha_state() File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 533, in async_write_ha_state self._async_write_ha_state() File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 573, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/climate/init.py", line 338, in state_attributes data[ATTR_PRESET_MODE] = self.preset_mode File "/home/homeassistant/.homeassistant/custom_components/ipx800v5/climate.py", line 129, in preset_mode return switcher[self._mode] KeyError: None

je vais essayer ce que t'as mis sur pastebin

Aohzan commented 1 year ago

je veux bien le retour sur l'autre thread du coup :pray: