Hi.
Is it possible to limit the states to on and off only?
I have problem with one switch going to “unknown” and then back to “off” state, which triggers the double click action
I understand the question, but unfortunately this would break functionality of the automation since ‘on’ and ‘off’ are only states for a switch. I also support input_buttons and normal buttons, which have other types of states.
The issue you are experiencing is an issue with connectivity. That’s the issue that should be resolved instead of adjusting automations to accomodate this bad behaviour.