How to set a Value on Reed Contact

Hello, everyone.
I’m new to Home Assistant, I’ve now given up my ioBroker VM because HA is much more modern and there is a cool community behind it. But switching is not very easy.
I need your help, please.
I would like to save a value in a “sensor”:
I mean. When a window of many is open, write one worth it. (Do you take a helper here?)
In Blockly I would only need 2 minutes. But here I am overwhelmed.

What I want;
If A or B or C or D is true, set Value (sensor ??) to true.

A, B, C, D … represent my door contacts (binary senors)

Thank you

Add A, B C and D to a Group.

If any of the door contacts are on the group will be on.

This still has to be done manually in YAML in your configuration.yaml file as there is no GUI for groups as yet. But there is a very clear example in the documents.

2 Likes

Thanks for that “aaaaah” moment :slight_smile:
Thats how it works. Is there any other way of realizing something like this? Automation with OR links and call a serive?
Whereby I would need an automation for from OFF to ON, and one from ON to OFF. Which then gave me a helper boolean set: D

I would like to have different ICONs for door open / close.

In principle like an entity filter. But only 1 icon for several states

Yes you can use a binary template sensor.

template:
  - binary_sensor:
      - name: "All Door Sensors"
        state: "{{ is_state('binary_sensor.a', 'on') or is_state('binary_sensor.b', 'on') or ...etc }}"
        device_class: door

The advantage here is you can assign the device_class: door. So you get a nice icon that opens and closes with the state of the sensor and the state is open/closed rather than on/off as for the group.

1 Like

thats exactly what i wanted :))))
But i cant use it in a custom:paper-buttons-row?


Sure, it just creates another binary_sensor. Exactly like you existing door contacts.

there should be a problem with the card, it just doesn’t appear. red square…

Do you have the entity id correct?

sure… on the first picture, you can see that i created one entity card and one button card… (Magnetkontakte_Status)… maybe someone has a idea.

right now i just use a custom:button-card and it works like a gem, thanks for that :wink: