@cbusso Thanks!! It was fun writing.
So the voice commands you can use for home automation are pre-defined by Amazon, I can't change them. For speed, you have two options.
- Use Percentage to change speed, 1-100% (I would enable this regardless of if you do the others or not, also, note, you may need to program minimums, I have a fan that I did that has to be a minimum of 30% or it won't spin.) If you are enabling set speeds, you can map percentage to speed easy enough 0-33 is low, 33-66 medium >66 high.
- Add another device, "Alexa, Bedroom Fan Medium Speed On" - you can add as many as you like. Optionally, this can store the speed in flash or just RAM if you are okay with it being volitile, then read this when the fan is turned back on, to enable the correct pre-set speed.
Personally, I'd do both and add a standard "Alexa, Bedroom Fan On" with speed stored in flash from previous calls to restore the prior set speed.
Let me know how this works for you! Glad to see you like the skill, I'll be expanding it soon, to allow multiple photons to have the same alexa device name, and to pass down the device id of the device making the alexa call (so you can map photon to a specific alexa device, like bedroom photon is only activatable by the bedroom echo.) Let me know if you have other ideas as well!