I have the same problem since my update last night as well to 2022.10.4
I then applied 2022.10.5 just today when it became available – no help.
My binary_sensor looks at items that indicate a generator is running (frequency or voltage detected) to report “ON”, for which I have an automation based on when that sensor goes OFF to compute an ever-increasing hour meter.
Definition of template and history of when the generator ran but failed to produce “ON”.
Doing a little more research, when I put the same expression in the Template Editor it has the correct behavior and evaluates to True. I also show the current values of the two input sensors as well as the current value of the (now broken) template sensor stubbornly showing the off state.
In the screenshot of the Template Binary Sensor, it shows you wrapped the template in double-quotes and put it on a separate line using the > line-continuation character. It’s one or the other, not both. Remove the double-quotes (or remove the line-continuation character and put the template on the same line as the state: option).
The way you have it now will make the template’s output always be interpreted as off.
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.