I have defined a dummy device to represent the status of a MQTT device as follows:
define garEntryDoor dummy
attr garEntryDoor stateFormat [mqttDev:mfd-gar-entryDor]
which sets the state properly but does not update
I tried the following suggested by the documentation:
attr garEntryDoor stateFormat {[mqttDev:mfd-gar-entryDor]}
but received this error message:
Zitatsyntax error at (eval 1185876) line 1, near "mqttDev:"
How do I get the STATE to update automatically?
There is no "update connection" between the dummy and the mqtt Device.
One tricky solution could be :
attr mqttDev userReadings dummy:mfd-gar-entryDor.* {fhem("set garEntryDoor [$name:mfd-gar-entryDor]")}
and simple delete your stateFormat in Dummy
Other option: use a readingsProxy device instead of dummy.
This might also help to configure a "one button" garage door opener, see e.g. https://forum.fhem.de/index.php/topic,124240.msg1190483.html#msg1190483 or https://forum.fhem.de/index.php/topic,127542.0.html.
Beta-User: The readingsProxy device is the correct solution to my application; thank you
Otto123: Thank you for your solution although the readingsProxy device seems like a better match than a dummy device