MQTT Short Syntax

Hello,

my Tescase fo receiving a mqqt message is the following.

  1. creating an mqqt Broker (Thing)
  2. creatig a genereic mqqt Thing and match the Broker Thing to the generic Thing
  3. creting a channel for the generic Thing and define the state topic

Then i put in the .items file the following:
String mqtt_kitchen_gas “Gas Level [%s]” { channel=“mqtt:topic:myMqttThing:myChannelID” }

Is there a easier way instead of channel…
I saw an syntax like this

Number mqtt_kitchen_gas “Gas Level [%.1f]” {mqtt="<[mosquitto:Home/Floor1/Kitchen/Gas_Sensor:state:default]"}
But what mus i change from channel to mqtt syntax above?

This is mqtt 1.xx item configuration and will not work with 2.xxx.

For mqtt 2.xxx you can do everything from PaperUI or use files for Things/Items. Most choose to use PaperUI but I’m hardheaded and prefer files.:laughing:

To understand mqtt 2.xxx here’s a great link that will help.