Nabu Casa and Alexa fans - how do you pass numeric values from Alexa to HA?

I know how to flip a switch or execute a script in HA via Alexa. But how can I say a numeric value to Alexa and have HA react to it? I don’t mean things like “turn the light on to 50%”, that’s easy with Hue lights but something like “set delay in the slideshow to 10 seconds”.

So in my case, the sequence would be (HA-Nabu Casa-Alexa-MQTT):

  1. “Alexa, change the slideshow delay to 10 seconds”
  2. An HA script is triggered which sends an MQTT message topic “frame/slide_show_delay”, message “10” to a connected device.

I know how to trigger the script. But how can I work with a variable?

2 Likes