In scenes, you can retrieve the last « state » of an MQTT sensor.
I would like to be able to retrieve the last « text » of an MQTT Text sensor to then reuse it in scenes:
In scenes, you can retrieve the last « state » of an MQTT sensor.
I would like to be able to retrieve the last « text » of an MQTT Text sensor to then reuse it in scenes:
I’m wondering whether it’s useful to create a new action, or whether it’s instead the ‹ retrieve last state › action that should be improved to also work with text sensors…
I leave the choice to @pierre-gilles because I don’t know what’s simplest on the dev side.
Given that we’re aiming for simplification on the user side, I agree with @StephaneB . Nothing complicated on the dev side anyway, you just need to take into account the « type » of the feature to retrieve the correct column!
Thanks @Terdious for the info and I agree as well.
I’ll change the post title.

The change :
@pierre-gilles, since I already know there will be other « string » types coming, I took the liberty of creating a constant in the utils to list the string types. Does that work for you?
That looks perfect to me @Terdious, I’ll test tomorrow and if it’s good I’ll merge, but as far as the code goes it looks good to me!
Looks good to me, tested and merged ![]()
It will be included in the next Gladys release!
It’s live in Gladys Assistant 4.59: