I found out that the normally not existing topic path is the right one for posting commands.
hm2mqtt is listening for such entries.
The switches are now ok.
But I have one where I can not find a way to work.
This is the original channel config:
```
- "{\\"name\\":\\"Charging Mode\\",\\"state_topic\\":\\"hm2mqtt/HMJ-2/device/009b08a56a51/data\\",\\"value_template\\":\\"{% set mapping = {\\\\\\"chargeDischargeSimultaneously\\\\\\":\\\\\\"Simultaneous Charging/Discharging\\\\\\",\\\\\\"chargeThenDischarge\\\\\\":\\\\\\"Fully Charge Then Discharge\\\\\\"} %}{% set stringifiedValue = value_json.chargingMode | string %}{% if stringifiedValue in mapping %}{{ mapping\[stringifiedValue\] }}{% else %}{{ stringifiedValue }}{% endif %}\\",\\"command_template\\":\\"{% set mapping = {\\\\\\"Simultaneous Charging/Discharging\\\\\\":\\\\\\"chargeDischargeSimultaneously\\\\\\",\\\\\\"Fully Charge Then Discharge\\\\\\":\\\\\\"chargeThenDischarge\\\\\\"} %}{% set stringifiedValue = value | string %}{% if stringifiedValue in mapping %}{{ mapping\[stringifiedValue\] }}{% else %}{{ stringifiedValue }}{% endif %}\\",\\"command_topic\\":\\"hm2mqtt/HMJ-2/control/009b08a56a51/charging-mode\\",\\"options\\":\[\\"Simultaneous Charging/Discharging\\",\\"Fully Charge Then Discharge\\"\],\\"availability\\":\[{\\"topic\\":\\"hm2mqtt/availability\\",\\"payload_available\\":\\"online\\",\\"payload_not_available\\":\\"offline\\"},{\\"topic\\":\\"hm2mqtt/HMJ-2/availability/009b08a56a51\\",\\"payload_available\\":\\"online\\",\\"payload_not_available\\":\\"offline\\"}\],\\"unique_id\\":\\"009b08a56a51_charging_mode\\",\\"device\\":{\\"ids\\":\[\\"hame_energy_009b08a56a51\\"\],\\"name\\":\\"HAME Energy HMJ-2 009b08a56a51\\",\\"model_id\\":\\"HMJ-2\\",\\"manufacturer\\":\\"HAME Energy\\",\\"sw_version\\":\\"116.6\\",\\"connections\\":\[\[\\"bluetooth\\",\\"00:9B:08:A5:6A:51\\"\]\]},\\"origin\\":{\\"name\\":\\"hm2mqtt\\",\\"url\\":\\"https://github.com/tomquist/hm2mqtt\\"}}"
```
And this is what I tried in channel config
```
MARSTEK_Speicher_C_MQTT_HMJ2_009b08a56a51_Charging_Mode: type: string label: MARSTEK Speicher C HMJ2 009b08a56a51 Charging Mode description: "" config: stateTopic: hm2mqtt/HMJ-2/device/009b08a56a51/data commandTopic: hm2mqtt/HMJ-2/control/009b08a56a51/charging-mode transformationPattern: - JSONPATH:$.chargingMode retained: false postCommand: false commandTransformation: - "SCRIPT:javascript:|- var value = input; if (value == 'Simultaneous Charging/Discharging') { value = 'chargeDischargeSimultaneously'; } else if (value == 'Fully Charge Then Discharge') { value = 'chargeThenDischarge'; } value;"
```
Any Idea for this one?
I already adaptet the item:
```
metadata:
stateDescription:
value: ""
config:
options: "chargeDischargeSimultaneously=Simultaneous Charging/Discharging,chargeThenDischarge=Fully Charge Then Discharge"
```
Edit:
I struggle hard with this code editing text …