Are there predefined number slots?

Aaaaand it’s me again :slight_smile:

My next question: If I want to set my climate, I will need a slot that recognizes numbers for the temperature. Is there a build in method or slot, or will I have to a numbers from 4.5 to 31 in a slot?

Kind regards

I use (1…60) as a slot to use Rhasspy as a timer.

This is one example :
(mets | règle) le (chronomètre | minuteur) sur (1…60){number} (minutes | heures){duration}

1 Like

Ah cool, so 1…60 will include all numbers in between?

Yes 1…60 will include all numbers in between. You can also set steps if you dont want all numbers in that range. 1…60,2 would only include 1,3,5,7 …

You will find everything in the docs:

Cool thank you.

I’m not one of the guys never reading the docs, but often missing things while jumping around :smiley:

Question: Isn’t it possible to use (1…100) in a slot file, only directly in the sentences?

I created a slot file “degrees” like:


and in my sentences I used:

therm_deg = ($degrees){degrees!float}

and that is not working. For testing I then changed the slot file to only contain:


and it is still unable to recognise my intent. Only when I put the number range directly to the sentences file it works:

therm_deg = (4..31){degrees!float}

Why? :slight_smile:

You can not use slot list or slot programs in another slot file.

Okay, so I can stop trying :smiley: