Bonjour,
je me permet de relancer le sujet, car je galère avec l’intégration de ma V4 dans HA.
J’arrive à remonter l’état des relais physiques, à les actionner dans HA, et lors de la manip depuis le dashboard de l’ipx tout se met à jour dans HA.
Le soucis vient des entrées analogiques : impossible de remonter la valeur d’une tc-100 (sur l’entrée analogique 1), j’ai même testé la syntaxe de David69, sans succès. J’ai systématiquement une erreur dans HA. :
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 316, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 121, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 381, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 680, in state
value = self.native_value
File "/config/custom_components/ipx800v4/sensor.py", line 95, in native_value
return self.coordinator.data[f"A{self._id}"]
KeyError: 'A1'
et
Unexpected exception from <bound method DataUpdateCoordinator.async_refresh of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7f995a3970>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 109, in _handle_timer_finish
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 201, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 316, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 121, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 381, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 583, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 551, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 680, in state
value = self.native_value
File "/config/custom_components/ipx800v4/sensor.py", line 95, in native_value
return self.coordinator.data[f"A{self._id}"]
KeyError: 'A1'
Lorsque je lance la commande en http, j’ai bien une réponse en A1 :
http://192.168.1.28:85/api/xdevices.json?key=la_clé_API&Get=A

Cela parle-t-il à quelqu’un?
–>Mike