cancel
Showing results for 
Search instead for 
Did you mean: 

Script for color temperature command

Sir_Rob
Community Member

I can use the script editor to get lights to turn different colors based on a different dimmer's level, but I can't get them to display a specific white temperature. 

 

I'm likely not writing the script command correctly, but I can't find clear enough documentation to get me there.  Can someone provide an example of a script that works for them?

1 Recommended Answer

sipriyadarshi
Solutions Expert
Solutions Expert

Hello @Sir_Rob ,

You can refer to the documentation available online in regards to Automation Script Editor. The documentation provides details about how to create script automation for different device types and scenarios. It also provides sample scripted automation and details about different types of errors and warnings one can get. 

View Recommended Answer in original post

8 REPLIES 8

sipriyadarshi
Solutions Expert
Solutions Expert

Hello @Sir_Rob ,

You can refer to the documentation available online in regards to Automation Script Editor. The documentation provides details about how to create script automation for different device types and scenarios. It also provides sample scripted automation and details about different types of errors and warnings one can get. 

Thank you.  I read through these documents prior to posting.  I can find the instructions for using color temperature as a starter, but everything I try for using it as an action fails with errors.

Here is the example given for the starter:

starters:
- type: device.state.ColorSetting
 
device: My Device - Room Name
 
state: color.colorTemperature
 
is: 2000K

Can you provide a functional example of an action? 

I'm with the same problem ! 

Do you get to finally work with the color temperature as an action?

No, I have not been able to get it to work as an action.

This works for me:

automations:
- starters:
# omitted for brevity
condition:
# omitted for brevity
actions:
- type: device.command.ColorAbsolute
color:
temperature: 3500K
devices:
- Light 1
- Light 2
- Light 3

 

Thanks. In the meantime I was able to make it work 😊

Thank you.  I guess the problem was I had not capitalized the "K".  Problem solved!

Yeah, that has gotten me several times too. I don’t know why they made it case-sensitive