MQTT Sensor payload_on and payload_off error

Hey folks,

after a long time I try to get back to hass (thanks corona11). What I do get in the config validation after a bunch of updates is:

Invalid config for [sensor.mqtt]: [payload_on] is an invalid option for [sensor.mqtt]. Check: sensor.mqtt->payload_on. (See ?, line ?). 
Invalid config for [sensor.mqtt]: [json_attributes] is an invalid option for [sensor.mqtt]. Check: sensor.mqtt->json_attributes. (See ?, line ?). 
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 74).

**Can you tell me why the validation aren’t finding the right lines? (“See ?, line ?”) **

Could you tell me whats now wrong with the “payload”?

I do have two lines with payload in my conf:

#XCube_binary_sensor_d:

  • platform: “mqtt”
    state_topic: “zigbee2mqtt/Xiaomi_Cube”
    name: “XCube_binary_sensor_d”
    availability_topic: “zigbee2mqtt/bridge/state”
    value_template: “{{ value_json.contact }}”
    payload_on: false
    payload_off: true
    device_class: “door”

and

###BW SHP13
switch:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/Blitzwolf_SHP13"
    name: "BW_1_switch_ONOFF"
    availability_topic: "zigbee2mqtt/bridge/state"
    **payload_off: "OFF"**
    **payload_on: "ON"**
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/Blitzwolf_SHP13/set"

I use the Zibee CC2531 to MQTT bridge.

Thanks.

You dont have any command_topic

Do you mean that one?:

####Zibee CC2531 MQTT
mqtt:
  broker: 192.168.178.xx
  port: 1883
  client_id: homeassistant-1
  username: mqtt
  password: 'pswd'
  discovery: true