binary_sensor:
  - platform: mqtt
    name: "Ventana Habitación Noha" #Ventana Habitación Noha
    value_template: >-
      {% if value_json.RfReceived.Data == 'AAAAAA' %}
        {{'ON'}}
      {% elif value_json.RfReceived.Data == 'BBBBBB' %} 
        {{'OFF'}}
      {% else %}
        {{states('binary_sensor.ventana_habitacion_noha') | upper}}
      {% endif %}
    device_class: window
    state_topic: "sonoffbridge/tele/RESULT"
