Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

Alexander K avatar image
Alexander K asked

decimal "NUMBER" support?

Are decimal numbers supported? Trying to support something like "alexa, set sleep number 4.4" but that doesn't work. Tried as a literal too. Whole numbers on the other hand work. Any suggestions? "intent": "SleepNumber", "slots": [ { "name": "Amount", "type": "NUMBER" } ] SleepNumber set sleep number {0|Amount}
alexa skills kit
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JBachand avatar image
JBachand answered
Assuming you added: SleepNumber set sleep number {4.4|Amount} right? I haven't tested non ints but I can this weekend if you haven't found a solution.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JBachand avatar image
JBachand answered
Also, i keep open: http://echo.amazon.com/#settings/dialogs to see what the number is being input as. Maybe the formatting is just weird.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander K avatar image
Alexander K answered
Yes tried SleepNumber set sleep number {4.4|Amount} but that didn't help.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander K avatar image
Alexander K answered
Thanks for the #settings/dialogs , that's extremely useful. hmmm, it see's it as: four point four instead of 4.4
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JBachand avatar image
JBachand answered
oh yeah i forgot numbers get converted to their word types... try accepting that on your endpoint and converting back to a number, kinda sucks right now not having wildcards esp for this since you're probably going to have to have 100 of these entries.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander K avatar image
Alexander K answered
You are talking about LITERALS right? We've set the data type as NUMBER and it passes whole numbers correctly. I'll try LITERALS again, let's see.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander K avatar image
Alexander K answered
No luck. I don't think it's supported :(
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JBachand avatar image
JBachand answered
After adding SleepNumber set sleep number {four point four|Amount} too? There must be a combo of these that work haha, if not I'll test this weekend
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alexander K avatar image
Alexander K answered
OMG that was it!!! I had {0.0|Amount} for the literals too, changed it to {four point four|Amount} and it works now for the literals. It does transmit the numbers literally: slots":{"Amount":{"name":"Amount","value":"seven point one"}} so we would need to convert them server side but that should be easy. Shame that {0.0|Amount} doesn't seem to work with NUMBERS instead of literals.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.