Homeassistant auf Pekaway

Hallo Max,

mit den Änderungen startet die Integration bi mir nicht mehr:

Logger: homeassistant.config
Quelle: config.py:1079
Erstmals aufgetreten: 08:08:46 (1 Vorkommnis)
Zuletzt protokolliert: 08:08:46

Platform error: sensor - Exception importing custom_components.ads_waterlevel.sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1293, in _load_platform
cache[full_name] = self._import_platform(platform_name)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1325, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/util/loop.py”, line 201, in protected_loop_func
return func(*args, **kwargs)
File “/usr/local/lib/python3.14/importlib/init.py”, line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1406, in _gcd_import
File “”, line 1371, in _find_and_load
File “”, line 1314, in _find_and_load_unlocked
File “”, line 491, in _call_with_frames_removed
File “”, line 1406, in _gcd_import
File “”, line 1371, in _find_and_load
File “”, line 1342, in _find_and_load_unlocked
File “”, line 938, in _load_unlocked
File “”, line 755, in exec_module
File “”, line 893, in get_code
File “”, line 823, in source_to_code
File “”, line 491, in _call_with_frames_removed
File “/config/custom_components/ads_waterlevel/init.py”, line 13
return True
^^^^^^
IndentationError: expected an indented block after function definition on line 9

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

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 1079, in _async_load_and_validate_platform_integration
platform = await p_integration.integration.async_get_platform(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1128, in async_get_platform
platforms = await self.async_get_platforms((platform_name,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1206, in async_get_platforms
import_future.result()
~~~~~~~~~~~~~~~~~~~~^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1194, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1118, in _load_platforms
platform_name: self._load_platform(platform_name)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 1313, in _load_platform
raise ImportError(
f"Exception importing {self.pkg_path}.{platform_name}"
) from err
ImportError: Exception importing custom_components.ads_waterlevel.sensor

Frank

Ich denke inzwischen das Problem ist ein anderes:

Bei alten Relaisboard musste man zwischen kapazitiv und Widerstand umschalten in dem man eine Brücke auf dem board steckt.
Bei Core wird das wohl digital über Software gemacht. Ich meine mich erinnern zu können das die Vanpi Software GPIO PIN´s hochlegt.
Das muss gemacht werden damit auf dem entsprechenden Pin an dem der Sensor angeschlossen wird fest 3,3V anliegen.
Ich vermute mal das die HA Integration das nicht macht, oder?

Ich habe gedacht das das permanent auf dem Board gespeichert wird wenn man das einmal über die VanPi Software gemacht hat aber das stimmt wohl nicht. Müsste also über die HA Integration gemacht werden.

Frank

Problem gelöst!

ich habe jetzt GPIO 16 und GPIO 19 über die config.txt in der Boot Partition des PI auf high gesetzt und meine Tanksensoren funktionieren.

Keine Ahnung ob du das noch irgendwie in deine Integration reinbringen kannst und willst?

Für mich ist das erst einmal so ok da ich nur Tanksensoren nutze die mit Widerstand arbeiten.

Frank