Example Shelly 2PM Gen3 - MQTT Config
UID: mqtt:topic:111111111111:tg_mqtt_shelly2pmg3-000000000000
label: tg_mqtt_shelly2pmg3-000000000000
thingTypeUID: mqtt:topic
configuration:
payloadNotAvailable: "false"
availabilityTopic: shellies/shelly2pmg3-000000000000/online
payloadAvailable: "true"
bridgeUID: mqtt:broker:000000000000
channels:
- id: switch0
channelTypeUID: mqtt:switch
label: switch0
description: ""
configuration:
commandTopic: shellies/shelly2pmg3-000000000000/command/switch:0
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:0
transformationPattern: JS:| JSON.parse(input).output==true?'on':'off'
off: off
on: on
- id: switch1
channelTypeUID: mqtt:switch
label: switch1
configuration:
commandTopic: shellies/shelly2pmg3-000000000000/command/switch:1
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:1
transformationPattern: JS:| JSON.parse(input).output==true?'on':'off'
off: off
on: on
- id: switch0power
channelTypeUID: mqtt:number
label: switch0power
description: ""
configuration:
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:0
transformationPattern: JSONPATH:$.apower
- id: switch1power
channelTypeUID: mqtt:number
label: switch1power
configuration:
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:1
transformationPattern: JSONPATH:$.apower
- id: switch0voltage
channelTypeUID: mqtt:number
label: switch0voltage
configuration:
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:0
transformationPattern: JSONPATH:$.voltage
- id: switch1voltage
channelTypeUID: mqtt:number
label: switch1voltage
configuration:
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:1
transformationPattern: JSONPATH:$.voltage
- id: switch0current
channelTypeUID: mqtt:number
label: switch0current
configuration:
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:0
transformationPattern: JSONPATH:$.current
- id: switch1current
channelTypeUID: mqtt:number
label: switch1current
configuration:
stateTopic: shellies/shelly2pmg3-000000000000/status/switch:1
transformationPattern: JSONPATH:$.current