Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC 868 AG - YAML Code
#1
I've edited YAML code for IR gateway. I'm recieving error message related to "if" command - "Component not found if."

The code:

remote_receiver:
  pin: GPIO23
  dump: all

binary_sensor:
  - platform: remote_receiver
    name: "TEST"
    pronto:
      data: "0000 006D 0022 0000 0151 00AD 0015 0014 0017 0041 0015 0014 0017 0016 0015 0044 0012 0014 0017 0044 0013 0018 0013 0043 0013 0016 0015 0044 0012 0044 0013 0016 0015 0043 0013 0016 0015 0044 0013 0016 0015 0041 0016 0015 0015 0041 0016 0040 0015 0014 0017 0013 0018 0013 0018 003F 0018 0013 0018 003F 0019 0012 0018 0013 0018 003F 0018 003F 0018 003F 0018 06C3"

if:
  condition:
    binary_sensor.is_on: TEST
  then:
    - mqtt.publish:
        topic: IR_Bridge
        payload: "Something happened!"


component not found if.
component not found if.
Reply
#2
# In some trigger:
on_...:
if:
condition:
# Same syntax for is_off
binary_sensor.is_on: my_binary_sensor
Reply
#3
you can use 433M receiver make a binary sensor for a test firstly.
Reply
#4
(08-23-2022, 10:54 PM)admin Wrote: # In some trigger:
on_...:
  if:
    condition:
      # Same syntax for is_off
      binary_sensor.is_on: my_binary_sensor

Thanks

What is the meaning of "on_...:" ?
Reply
#5
here is details on esphome official webpage: https://esphome.io/components/binary_sensor/index.html
Reply


Forum Jump:


Users browsing this thread: