Actually, since this behavior is not intuitive at all, I already changed it for brightness and will do the same for color and color-temp soon. So when you ask Alexa to turn on a lamp to 50%, the powerState attribute will simultaneously be set to „ON“.
quick update: I just deployed an update of the backend which contains the aforementioned convenience features: Lights will be switched to "ON" automatically when brightness, color or color temperature are updated.
how would i change colour of lamp, but not turn it on?
Would it make more sense to send on/off command with colour, brightness and temp
Well, you could argue that setting the color of a lamp implicitly should switch it on, too. At least that‘s what most users expect. If you asked Alexa to turn on red light, and the lamp stays dark, this is perceived as not working, even though the color attribute of the lamp was indeed updated.
I may want to set the colour or brightness to a level but not turn on the lamp, I would argue that its best to either send on command with colour and brightness, or send it seperatly,. That way the user can program the response they wish.
How do you tell Alexa in one command to do two things?
I think you are right. This is about a physical device that humans observe. It should do what is sensible for regular users. If I set it to 50% red I think most users would expect to see it alight. If I was odd enough to ask for 100% black I would expect it to be off. If I just set brightness to 80% I would expect it to go to 80% on with whatever the last colour was set to.
Great, that's perfect !!
I'm having trouble figuring out what message the alexa node is sending.
Is it possible to have a field in the node message that indicates a message sent by Alexa?
That' a great idea! I just release v.1.11.0 that includes a msg.payload.directive attribute.