Your configuration contains extra keys that the platform does not support [payload_open], [payload_close], [state_open], [state_closed]

Hi,

This morning I tried to use Hassio to open my door and turn on my lights but it wasn’t working.

I logged into Hassio and received the error below.

Your configuration contains extra keys that the platform does not support (but were silently accepted before 0.88). Please find and remove the following.This will become a breaking change.
[payload_open], [payload_close], [state_open], [state_closed]. (See /config/configuration.yaml, line 50).

Below is line 50

switch:
  - platform: mqtt
    name: "Front Door"
    state_topic: "cmnd/garagestate/POWER2"
    command_topic: "cmnd/garage/POWER2"
    payload_open: "ON"
    payload_close: "ON"
    state_open: "ON"
    state_closed: "OFF"
    optimistic: false

Well, according to the MQTT switch documentation, that warning message is correct; those keys do not exist.
There are _on/_off versions that you may want to use instead.

The message is true check the documentation

Thanks, have made the changes as suggested, but my lights also do not work. I have check the mqtt with mqtt.fx and see no commands sent when I press buttons in Hassio. My light config below.

light:
  - platform: mqtt
    name: "Clothesline Light"
    state_topic: "stat/clotheslinelight/POWER1"
    command_topic: "cmnd/clotheslinelight/POWER1"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false
  - platform: mqtt
    name: "Shed Light"
    state_topic: "stat/clotheslinelight/POWER2"
    command_topic: "cmnd/clotheslinelight/POWER2"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: false

Thanks Again,

Ben

Logs from hassio

Unable to find platform alexa. Search path was limited to path of component: homeassistant.components

10:11 AM loader.py (ERROR) - message first occured at 9:02 AM and shows up 3 times

Your configuration contains extra keys that the platform does not support. Please remove [payload_open], [payload_close], [state_open], [state_closed].

10:11 AM helpers/config_validation.py (WARNING) - message first occured at 9:46 AM and shows up 2 times

Testing configuration at /config WARNING:homeassistant.helpers.config_validation:Your configuration contains extra keys that the platform does not support. Please remove [payload_open], [payload_close], [state_open], [state_closed]. Failed config General Errors: - Platform not found: media_player.alexa Successful config (partial)

10:07 AM components/hassio/__init__.py (ERROR)

Disconnected from MQTT (1). Trying to reconnect in 8 s

9:39 AM components/mqtt/__init__.py (WARNING)

Disconnected from MQTT (1). Trying to reconnect in 4 s

9:39 AM components/mqtt/__init__.py (WARNING)

Disconnected from MQTT (1). Trying to reconnect in 2 s

9:39 AM components/mqtt/__init__.py (WARNING)

Disconnected from MQTT (1). Trying to reconnect in 1 s

9:39 AM components/mqtt/__init__.py (WARNING)

Your configuration contains extra keys that the platform does not support. Please remove [payload_open], [payload_close], [state_open], [state_closed]. (See /config/configuration.yaml, line 50).

9:02 AM helpers/config_validation.py (WARNING)

Any one have an Idea?

What firmware is running on this device?

When it stopped working I upgraded everything to the latest.

Hassio is running 0.89.1

No, what device is sending these MQTT messages?

Oops sorry, all devices that are not working are running Tasmota.

Have you tried using auto discovery then? https://github.com/arendst/Sonoff-Tasmota/wiki/Home-Assistant#add-tasmota-devices-to-home-assistant

Thanks mate, I did that and also removed the mqtt: from my yaml file and added it from the config panel and now its all working…

thanks again!!

Not quite, I get this in my (0.92.2) log:
2019-05-08 09:14:26 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [state_on], [state_off].
2019-05-08 09:14:26 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [state_on], [state_off].

And, are you absolutely sure that these occurrences of state_on and state_off are defined for an MQTT switch?

Yes they where. But it looks like if the states_on/off are the same as payload_on/off, you have to remove the state_on/off lines. Anyway, when removed, the switches work fine (incl. states) and the warnings are gone.