KNX show sensor as unavailable when group address could not be synced

Hi,

I added a water leak sensor to my KNX installation which exposes an alarm/no alarm state which I have connected to Home Assistant. It works fine but I would like the state of the sensor to not be “dry” when Home Assistant could not sync the group address from the bus if for example the water leak device fails.

How can I achieve this? I tried the search function/googling but could not find anything realated.

Below is how I added the sensor to the yaml:

  binary_sensor:
    - name: "Leak sensor"
      state_address: "4/3/0"
      device_class: "moisture"
      sync_state: 2

With sync state 2 it polls every two minutes in addition to processing the write message but if it can’t sync it just stays on “dry”. Ideally it should show unavailable or offline.

Thanks

Hi :wave:!

This is deliberately not implemented this way because on many installations (for different reasons) some of these syncs can take longer than the timeout of 2 seconds (which is already 1s longer than specifications suggest) occasionally - so this would cause peoples automations to go wild :grimacing:

The ideal solution would be to configure the sensor itself (from ETS) to send its state every x minutes and install a watchdog automation in HA for incoming telegrams. This would cut bus load for this application in half since you don’t need to send a GroupValueRead telegram.

If this is not supported by your device you may do the sync thing manually in an automation using knx.read service, set a timeout and listen for an answer via knx_event - clearing the timeout.

1 Like

Thank you for the info I‘ll look into the watchdog automation. The sensor can indeed send periodic messages.