Bonsoir, j’utilise APImaree, j’ai fait le test avec le code 127 et il y a un problème.
j’ai été sur le github, j’ai trouvé une réponse qu’il faut utiliser le vieux port de la rochelle
voici le lien:
opened 10:12AM - 06 Sep 23 UTC
closed 04:18PM - 05 May 24 UTC
sensor:
- platform: apiMareeInfo
code: 127
latitude: 46.16604
longitud… e: -1.21606
scan_interval: 120
is causing a error:
Logger: homeassistant.components.sensor
Source: custom_components/apiMareeInfo/apiMareeInfo.py:141
Integration: Capteur (documentation, issues)
First occurred: 12:08:48 (1 occurrences)
Last logged: 12:08:48
Error while setting up apiMareeInfo platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/apiMareeInfo/sensor.py", line 94, in setup_platform
myPort.update()
File "/config/custom_components/apiMareeInfo/sensor.py", line 64, in update
self._myMaree.getinformationport(origine=self._origine)
File "/config/custom_components/apiMareeInfo/apiMareeInfo.py", line 141, in getinformationport
self._nomDuPort = jsondata["contenu"]["marees"][0]['lieu']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
despite converting its coordinate to GPS to fill yaml: https://maree.info/127
bonne soirée