I managed to eventually get around the problem here but on latest HA 2022.11.2 I think there is a bug with the visual automation editor.
I tried adding an automation which switches on the heating for 5 mins then switches it off.
When I use the visual editor to select from the available states for a configured boolean (Off, On, Unavailable etc) the automation fails (never runs), and when I check the trace it shows the clue to the error on a particular condition as result false, state off, wanted_state Off.
As the possible options to select from in the visual editor do not match the actual states returned by the boolean the automation fails.
When I use the yaml editor to correct the wanted_state to ‘off’ with an uncapitalised ‘o’ the automation works.