Problem with Binary_Sensor for use of mqtt

Hello, I am new to this forum and I want to apologize for ignorance I have the following configuration in my configuration.yaml.

binary_sensor:

  • platform: mqtt
    name: “Door”
    command_topic: “L”
    state_topic: “L”
    qos: 1
    payload_on: “P”

  • platform: ping
    name: Door Sensor
    host: 10.8.0.11
    scan_interval: 10

But it gives me this error
Invalid config for [binary_sensor.mqtt]: [command_topic] is an invalid option for [binary_sensor.mqtt]. Check: binary_sensor.mqtt-> command_topic. (See?, Line?). Please check the docs at https://home-assistant.io/integrations/mqtt/

And that in the article

Tell me that this gets like this ??? … I don’t understand why the mistake … can someone help me thanks in advance … regards

You cant change a binary sensor’s state. It is a sensor that reports states to home assistant. Thus there is no such thing as a command topic for a binary sensor. See the valid configuration options here: https://www.home-assistant.io/integrations/binary_sensor.mqtt/#configuration-variables

Also please read point 11 here: How to help us help you - or How to ask a good question and edit your post accordingly.