ESPHome not accepting HA binary sensor?

Please don’t post pictures of text. Post the correctly formatted text.

It should go under binary_sensor: as you want a binary sensor.

What error is esphome throwing up when you attempt to validate the config?

Does the config work without the on_value lambda?