Invert the state of a sensor in dashboard view?

I have tried to search in here and on github but havent found the solution to this. I have a aquara zigbee door/window sensor on my garage door. When it states open, the door is closed and vice versa. How do I switch it so the state in the dash is correct. I really do not have any automations on the sensor so I only want it tho show the correct state.

Best regards

I solved it in Node Red and with Node Red Companion. Actually a pretty easy fix.

The alternative was to make a template sensor in HA that would do the same as you probably did in NodeRed.

The link here opens up the Home Assistant Template documentation at the right example to solve your task.

Thank you, yes the logic behind looks similar. I do use Node Red a lot communicating with another smart home system, so it is pretty convenient to have it in Node Red.