YAML configuration for connecting Sonoff RF 433mhz bridge to HA

Hey to all developpers
I am very new to HA and I try to intergrate all my sonoff devices on HA. I really need helps to establish the right configuration of the config file. I already apologies for my poor english and the fact that I will not use the proper therms …

I have a RF433 bridge flashed with the proper firmware and and manage to get the code transmetted by the bridge to HA (003e0ce when off, 003e0ce2 when on). I tried to implement the template into the configuration file and create the binary sensor witch can show the current state of the sensor. I can see on the dashboard that the sensor is created but it does not show the state of the sensor. Do I have write the right yaml code? Someone can hep me? Here below the code snifet included in the conf file.

template:

  • trigger:
    • platform: event
      event_type: esphome.rf_code_received
      event_data:
      code: 003e0ce2
      variables:
      to_state: off
    • platform: event
      event_type: esphome.rf_code_received
      event_data:
      code: 003e0ce1
      variables:
      to_state: on
      binary_sensor:
    • name: lumière bur
      device_class: door
      state: “”

Please format your code properly. Point 11 here How to help us help you - or How to ask a good question

And I changed your question’s category to configuration, since this isn’t a development question and has nothing to do with templates. You’ll have better luck using the right tags and categories.

Huh thought I did that hours ago :slight_smile:

1 Like

Maybe a connection issue and it didn’t save? The forum has been particularly slow for me today. :person_shrugging: :slight_smile:

1 Like

Ok and sory I am very new to HA ans to this forum I dont know so much about the topics…