How to make Openhab understand a string which contains a time?

Hi

I’m not entirely sure how you would achieve this, but I think this tutorial will help

If I were doing it, I would create a rule that triggered when the Item changed, then look for clues for intentions and values with the text string.

Thankfully Alexa is giving you the “Speech to Text” string, so you “only” need to work out the intention. and harvest the value.

rule "Alexa Speech to Text"

when SalexesEchoDot_LastVoiceCommand changed

then

// and here's the tricky bit...

// What is the intention?
// How do you know if the string starts with (contains) "Set a Timer"

// What do you with it?
// If it is a Timer intention, what is the required time?

end

Good luck, I’m looking forward to seeing how you progress.

Quick search results

https://community.openhab.org/search?q=speech%20intention