LCN binary Sensor

I have the following problem with my LCN integration.
I have 2 door contacts that are connected to 2 binary sensors. However, the display is inverted. When the door is closed, it is displayed as open.
Greetings Michael

You can use a template binary sensor or a template helper to invert the sensor state:

As an alternative you might do some logic with the LED states inside your LCN modules to invert the state and display the result in HomeAssistant.

Unfortunately I can’t make any progress with the suggested solutions. I have just started with HA.
Can you offer me a more concrete solution?
The binary sensor is in the module m000040.binsensor8.
The entity is called binary_sensor.tur
Thanks and regards

In your HomeAssistant frontend click on “Settings” → “Devices and services” → “Helpers”.
Click on “Create Helper” → “Template” → ‘Template binary sensor’.
Enter a new name (e.g. “Door”).
In state template enter:

{{ not(states('binary_sensor.tur') | bool) }}

Choose the appropriate device class (e.g. Door).

Clicking on “Submit” creates a new inverted binary sensor which you can add to the dashboards as usual.

thank you very much it can be so easy.
If you know what you’re doing.

1 Like