binary_sensor: - platform: mqtt name: "Movimiento BaƱo General" value_template: >- {% if value_json.RfReceived.Data == 'FAD6AC' %} {{'ON'}} {% elif value_json.RfReceived.Data == 'FAD6A0' %} {{'OFF'}} {% else %} {{states('binary_sensor.movimiento_bano_general') | upper}} {% endif %} device_class: motion state_topic: "sonoffbridge/tele/RESULT" off_delay: 10