New Manual MQTT Entities Syntax

Hi,

I get this error with my new configuration for MQTT binary sensors:

Logger: homeassistant.config
Source: config.py:454
First occurred: 09:52:31 (3 occurrences)
Last logged: 10:03:51
* Invalid config for [sensor]: [payload_on] is an invalid option for [sensor]. Check: sensor->payload_on. (See /config/mqtt_devices.yaml, line 16).
* Invalid config for [sensor]: [payload_on] is an invalid option for [sensor]. Check: sensor->payload_on. (See /config/mqtt_devices.yaml, line 2).
* Invalid config for [binary_sensor]: Device must have at least one identifying value in 'identifiers' and/or 'connections' for dictionary value @ data['device']. Got OrderedDict([('configuration_url', 'http://192.168.111.105/')]). (See /config/mqtt_devices.yaml, line 2).

And this is the new YAML code:

# Sensor de movimiento
  binary_sensor:
    name: 'PIR Sala de TV'
    state_topic: "tele/bridgerf/RESULT"
    unique_id: pir_sala_tv
    value_template: "{{value_json.RfReceived.Data}}"
    payload_on: 'E572FE'
    payload_off: 'E572FEoff'
    device_class: motion
    device:
      configuration_url: "http://192.168.X.Y/"
    qos: 1
    off_delay: 10

# Sensor magnético
    name: 'Magnetico Cajón Escritorio'
    unique_id: magnetico_cajon_escritorio
    state_topic: "tele/bridgerf/RESULT"
    value_template: "{{value_json.RfReceived.Data}}"
    payload_on: "AA14A1"
    payload_off: "AA14A1off"
    device_class: opening
    device:
      configuration_url: "http://192.168.X.Y/"
    qos: 1
    off_delay: 10

Can anyone help?

Need a - in front of name: and need to indent other fields below that. not sure why it is giving you payload errors.

# Sensor de movimiento
  binary_sensor:
    - name: 'PIR Sala de TV'
      state_topic: "tele/bridgerf/RESULT"
      unique_id: pir_sala_tv
      value_template: "{{value_json.RfReceived.Data}}"
      payload_on: 'E572FE'
      payload_off: 'E572FEoff'
      device_class: motion
      device:
        configuration_url: "http://192.168.111.105/"
      qos: 1
      off_delay: 10

Thank you, I did the change and have to add “Identifiers” under “Device” section, because I got this error:

ERROR (MainThread) [homeassistant.config] Invalid config for [binary_sensor]: Device must have at least one identifying value in 'identifiers' and/or 'connections' for dictionary value @ data['device']. Got OrderedDict([('configuration_url', 'http://192.168.X.Y/')]). (See /config/mqtt_devices.yaml, line 15).
mqtt:
 binary_sensor:
  - name: 'PIR Sala de TV'
    state_topic: "tele/bridgerf/RESULT"
    unique_id: pir_sala_tv
    value_template: "{{value_json.RfReceived.Data}}"
    payload_on: 'E572FE'
    payload_off: 'E572FEoff'
    device_class: motion
    device:
      configuration_url: "http://192.168.111.105/"
      identifiers: SNSOMETHING150814V5
      manufacturer: SONOFF
      model: CT60        
    qos: 1
    off_delay: 10