Same as for shutters there are two things needed (at least it is working with that in my OH).
Reason is that the Status is a number, and the command is a switch:
Type switch : Abzugshaube [
mode="WRITEONLY",
commandExtension="/devices/27",
onValue="{\"name\":\"TURN_ON_CMD\"}",
offValue="{\"name\":\"TURN_OFF_CMD\"}"
]
Type number : AbzugshaubeStatus [
stateExtension="/v4/devices/27",
stateTransformation="JSONPATH:$.device.statusesMap.Position",
commandTransformation="JS:RollerShutterPositionJSON.js",
commandExtension="/devices/27"
]
I can see in my openHAB Log that Status changes from 0 (off) to 100 (on).
You are right, the commandTransformation is not working as it should for the hood in kitchen (German: “Abzugshaube”).
But for me it was still ok just to see status 0 or 100 - and can use that staus in rules.
Log:
2023-09-18 11:20:20.138 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'AbzugshaubeStatus' changed from 0 to 100