Button entity not working

Hi All,

I updated to latest HA version. So new button entity can be used.

I used the example from the page:

- platform: mqtt
  unique_id: "dd597087-bf11-4970-8793-cbad6e8805b8"
  name: "Restart Bedroom Switch"
  state_topic: "home/bedroom/switch1"
  command_topic: "home/bedroom/switch1/commands"
  availability:
    - topic: "home/bedroom/switch1/available"
  payload_press: "restart"
  qos: 0
  retain: false
  entity_category: "config"
  device_class: "restart"

But when I do a config check I get this error:

Invalid config for [button.mqtt]: [state_topic] is an invalid option for [button.mqtt]. Check: button.mqtt->state_topic. (See ?, line ?).

Have this line in configuration.yaml

button: !include package/includes/button.yaml

in this button.yaml file I have the platform part from above.

A button has no state. It can only use to send a command.
Remove the state_topic will work.

I did. But funny that this was a example on de ga website itself haha

Hmm, no. On the HA-Website is not state_topic in the example
https://www.home-assistant.io/integrations/button.mqtt/#full-configuration

Maybe they correct it. I got the example from same location haha… To test it first… But problem solved here and on the site haha