Changing the value of a sensor

Hi!
I am new to home assistant and have been working on a few projects. One of them is a sensor on my garage door. It is a wyze door switch (binary_sensor.wyzesense_77a3502d). Right now when the garage door is Closed the sensor displays Open on the UI. When it is closed it displays open. It is set to on = closed and off = open.

How do I swap the values? I have tried different things, but I am not a programmer so I struggle-fumble my way through a lot of this. Thanks in advanced!

You can use the Template Binary Sensor to swap the values.

# Example configuration.yaml entry
binary_sensor:
  - platform: template
    sensors:
      garage_state_swapped:
        friendly_name: "Garage Door"
        device_class: garage_door
        value_template: "{{ is_state('binary_sensor.wyzesense_77a3502d', 'off') }}"
2 Likes

Thank you! That worked. So I can understand, we created a new sensor called garage state swapped that uses the state from the binary sensor that I have, but sets the initial state to off?