I am looking for a way to force state updates even if the KNX sensor value is unchanged. These frequent updates can be handy to visualise sensor data in Grafana. I have tried to use sync_state expire / every, however the “GroupValueRead” result is not passed to InfluxDB if the value is unchanged. Therefore, I guess that the KNX library only triggers HA state updates when the sensor value has actually changed. It would be nice if we had an option to force these updates.
As a workaround, I am currently using a template sensor that copies the value of the KNX entity every 5 minutes. It works, but it is not very convenient, let alone manageable.
PS: I am aware that Grafana offers the fill(previous) function, but this requires that at least one sensor value is available in the specified time span. And that is not always the case.
Thanks a lot for your feedback. Initially, I was also of the opinion that the restriction is coming from the InfluxDB integration, but today I came across this solution:
This template sensor triggers a state update every minute. All updates are forwarded to influxdb, regardless of the value. Therefore, I assumed that the xknx/knx integration does change detection and updates the HA state only when the value has changed.
It does, unless you configure always_callback: true (for sensors at least, not sure for binary sensors). But then it still only triggers on GroupValueWrite (See link above). Most Knx actuator can be set to send their value periodically, so this should be a fine workaround (and also reduce bus load as there is no need for the read telegram).
Drawback of your solution is that these state (attribute) changes are not only stored in influx, but also in HAs database. (Same for always_callback).