MQTT Short Syntax


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

For mqtt 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 here’s a great link that will help.