Hi,
I share this things channels to manage the new Shelly product Power strip gen4.
Both status reading and commands works fine:
- id: PSG4_switch_0
channelTypeUID: mqtt:switch
label: presa 0
configuration:
commandTopic: shellypstripg4-<REPLACE>/command/switch:0
off: "off"
on: "on"
stateTopic: shellypstripg4-<REPLACE>/status/switch:0
transformationPattern:
- JSONPATH:$.output
- MAP:config:map:switch
- id: PSG4_switch_0_pf
channelTypeUID: mqtt:number
label: cosfi 0
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:0
transformationPattern:
- JSONPATH:$.pf
- id: PSG4_switch_1
channelTypeUID: mqtt:switch
label: presa 1
configuration:
commandTopic: shellypstripg4-<REPLACE>/command/switch:1
off: "off"
on: "on"
stateTopic: shellypstripg4-<REPLACE>/status/switch:1
transformationPattern:
- JSONPATH:$.output
- MAP:config:map:switch
- id: PSG4_switch_1_pf
channelTypeUID: mqtt:number
label: cosfi 1
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:1
transformationPattern:
- JSONPATH:$.pf
- id: PSG4_switch_2
channelTypeUID: mqtt:switch
label: presa 2
configuration:
commandTopic: shellypstripg4-<REPLACE>/command/switch:2
off: "off"
on: "on"
stateTopic: shellypstripg4-<REPLACE>/status/switch:2
transformationPattern:
- JSONPATH:$.output
- MAP:config:map:switch
- id: PSG4_switch_2_pf
channelTypeUID: mqtt:number
label: cosfi 2
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:2
transformationPattern:
- JSONPATH:$.pf
- id: PSG4_switch_3
channelTypeUID: mqtt:switch
label: presa 3
configuration:
commandTopic: shellypstripg4-<REPLACE>/command/switch:3
off: "off"
on: "on"
stateTopic: shellypstripg4-<REPLACE>/status/switch:3
transformationPattern:
- JSONPATH:$.output
- MAP:config:map:switch
- id: PSG4_switch_3_pf
channelTypeUID: mqtt:number
label: cosfi 3
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:3
transformationPattern:
- JSONPATH:$.pf
- id: PSG4_switch_0_apower
channelTypeUID: mqtt:number
label: watt 0
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:0
transformationPattern:
- JSONPATH:$.apower
unit: W
- id: PSG4_switch_0_voltage
channelTypeUID: mqtt:number
label: volt 0
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:0
transformationPattern:
- JSONPATH:$.voltage
unit: V
- id: PSG4_switch_1_apower
channelTypeUID: mqtt:number
label: watt 1
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:1
transformationPattern:
- JSONPATH:$.apower
unit: W
- id: PSG4_switch_1_voltage
channelTypeUID: mqtt:number
label: volt 1
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:1
transformationPattern:
- JSONPATH:$.voltage
unit: V
- id: PSG4_switch_2_apower
channelTypeUID: mqtt:number
label: watt 2
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:2
transformationPattern:
- JSONPATH:$.apower
unit: W
- id: PSG4_switch_2_voltage
channelTypeUID: mqtt:number
label: volt 2
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:2
transformationPattern:
- JSONPATH:$.voltage
unit: V
- id: PSG4_switch_3_apower
channelTypeUID: mqtt:number
label: watt 3
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:3
transformationPattern:
- JSONPATH:$.apower
unit: W
- id: PSG4_switch_3_voltage
channelTypeUID: mqtt:number
label: volt 3
configuration:
stateTopic: shellypstripg4-<REPLACE>/status/switch:3
transformationPattern:
- JSONPATH:$.voltage
unit: V
Just wondering if there’s a way to define prefix just in one place and reuse it as a tag?