Binary sensor helper and template sensors not working any more since 2022.10.x

Hi,

after upgrading to HA 2022.10, none of my binary helper groups and none of my templeate sensors for window ioen/close groups work any more:

  - binary_sensor:
      - name: Fenster_Sensor_Gruppe_Zimmer_Lena
        unique_id: 'a135344e-7b93-4270-9781-f6c0ce23a68a'
        state: >
          {{ is_state('binary_sensor.fenster_tur_12_ias_zone', 'on')
             or is_state('binary_sensor.fenster_tur_13_ias_zone', 'on')
            }}
        device_class: window
entity_id:
  - binary_sensor.fenster_tur_10_iaszone
  - binary_sensor.fenster_tur_12_svenja_iaszone
device_class: opening
friendly_name: Fenster Zimmer Svenja

both group sensors allways show “open”, even if both actual sensors show “closed”

That’s bad for “window open” automations …

any idea?

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”.


I include a history graph from a couple days before updating to 2022.10.4, when I was running 2022.9.x:

How do we get help?

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.

1 Like

That’s EXACTLY what’s wrong here – THANK YOU!

I went back and reviewed the backups made as I updated HA:

  • On 9/20/2022 configuration.yaml was correctly formatted running 2022.9.4 as I updated to 2022.9.5.
  • Then it appears the file was changed only 10 minutes before the backup was made for the update to 2022.10.4 on 10/18/2022.

So the evidence says I must have changed that syntax prior to the update, making the failure coincident with the upgrade.

I’ve got to add revision control to my config so I can keep track of such subtle things!

Again, thanks again!

You’re welcome!

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.

For more information about the Solution tag, refer to guideline 21 in the FAQ.

EDIT

The person I replied to isn’t the topic’s author so they can’t mark anything with the Solution tag.

The best I can do is Like the post.

I suspect since I’m not the OP that I cannot indicate this solves (or helps at all) @bsafh 's reported issue.

Thanks again

1 Like

Oops! I overlooked the fact you are not the topic’s author. Anyway, glad to hear it helped to resolve the problem for you.