In integration => KNX => configuration => communication settings, we can enable and disable “state updater”. The description:
“Set default for reading states from the KNX Bus. When disabled, Home Assistant will not actively retrieve entity states from the KNX Bus. Can be overridden by sync_state entity options.”
But according to KNX - Home Assistant, not every device types has sync_state as optional parameter.
For button, scene and notify it wouldn’t make sense.
Climate is an edge case where some configuration would not work without sync_state (when set to False).
Platforms that support respond_to_read would need validation - it can’t read from itself I guess.
For the rest it should be fine. Do you want to add that functions yourself?
I was planning to change the option to turn it on/off in the Configuration menu to make the default strategy and time selectable.
Thanks very much for for reply. If you agree, I would like to add that function by myself, for device types of Fan, Climate, Cover, Switch, except Button, Scene and Notify.
For my case, I would configure Climate for my floor heating. That a power saving screen, sleep for several minutes, wake up, write current temperature to KNX, if the current temperature is lower than expectation, write switch on to KNX.
If totally makes sense for me.
If you have a switch GA for example that doesn’t have a device that saves the state, home assistant will try to read the GA when there is no update for one hour.
But nobody will respond to the read request. Home assistant will therefore set the GA to off and also write it to the bus.
That is not the expected behavior. So in this case one needs to be able to disable the sync for these specific items.
I also have this for dimming GAs where the endpoint is a broadcast address of my DALI Gateway. This address also can’t be read so it will spam the log every hour. Luckily it doesn’t write to the bus in that case.
You can just omit the *_state_address for almost all entity configurations. These are optional. HA will never send a read request then.
For switches you may even set respond_to_read so other knx devices can query HAs state (similar to expose).
That is not the case. States are not changed when no responses are received. Neither will anything be written to the bus.
On startup though it will assume OFF state when there is no response.
If you experience different behavior you should investigate if some automation etc is doing that on your system.
Same problem as herr2d2
sync_state return an error:
Invalid config for 'knx' at KNX.yaml, line 12: 'sync_state' is an invalid option for 'knx', check: knx->light->0->sync_state
sync_state is needed at the init of HA to sync the light state.
After the start up init, it’ is no more needed because the actuator will always return and send the output state on each command (On/off, scene, timing, …)
So yes, it would very nice to have this option. It will reduce significant number of useless telegram on the knx bus.