I’m using openHABian 1.9 with openHAB 4.1.1.
I’m receiving the states of docker containers via MQTT and want to convert them to ON/OFF in a switch:
-
ON:
** running -
OFF:
** stopped
** exited
so, is there a way to either define multiple “off”-states or accept wildcards/regex?
UID: mqtt:topic:synology:homeserver
label: MQTT Homeserver
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:synology
channels:
- id: mosquitto_online
channelTypeUID: mqtt:switch
label: Mosquitto MQTT server online
description: ist der Container online
configuration:
stateTopic: servers/Homeserver/dockercontainer
transformationPattern: JSONPATH:$.['eclipse-mosquitto:latest'].state
off: exited
on: running