Enable use of the MQTT message in a scene

Hello @pierre-gilles,

This isn’t for the topic, it’s for the received message where we could change the scene’s behavior based on the received message, for example
« continue only if » message=value <
"Send message {{ mqtt value "
and another scene
« continue only if » message=value >
"Send message {{ mqtt value "
or when the « else » is added to the « continue only if »
« continue only if » message=value <
« Else »
"Send message {{ mqtt value "
I put « send a message » but it could be another action

this ties into my feature request Pouvoir créer des variables globales utilisables dans gladys (Latitude, Longitude, Date, Heure etc)
the idea is to have a bit more flexibility and configurability in Gladys

These are just suggestions; if there’s demand there will be votes so it might be interesting to develop, if there isn’t then no need to develop, but you can’t know without asking! :blush:

Also I had proposed this

ideally it would be better because it covered the send/receive side of an MQTT message in the scenes that @Lokkye implemented but we could use the state feedback like for other MQTT devices while keeping Gladys’ internal syntax — it’s just a mapping to do:

  • Gladys subscribes to the publish of an external device; when it receives it transforms it into Gladys MQTT syntax then sends it for processing as if it had received that message in Gladys format

  • when Gladys must publish the MQTT of an external device it transforms Gladys MQTT syntax to external MQTT syntax then sends the message

This would allow avoiding Node-RED for all devices not yet integrated or that won’t be because they’re too specific
But there aren’t many votes so maybe it’s not of interest; maybe an integration should be developed where we could handle this mapping as a simpler case since there would just be a table to add in the DB, I’m not there yet for that :thinking: but I’m not giving up :blush:!