Set Color of only one Panel (Python API)

Started by DD

DD

Hey I want to set a static color on a specific tile. This 'nl.write_effect(json.loads('{"command": "display", "version": "1.0", "animType": "static", "animData": "1 87 1 (10 50 150) 0 1", "loop": false}'))' worked fine till last week. I think an update broke it. The panel id is 87. In the docs is a only a function to set all panels at the same time.

Aliakbar Eski

You need a palette, even an empty palette is fine.
try:
{"command": "display", "version": "1.0", "animType": "static", "animData": "1 87 1 10 50 150 0 1", "loop": false, "palette":[]}

Let me know if this works

PS: I removed the brackets, they should not be there

Regards

nano_Student

Hey guys,

I am new to nanoleaf coding and was wondering what exactly is saved in the "animData" part of the dictionary in this. I've looked through the API on the write_effect function and it says that animData is "Rendered effect data", and I'm
confused as to what that means. Any help would be much appreciated.

Thanks.

nano_Student

Thanks Aliakbar, I think I understand how to use the aniData for a static effect. But would I have to use it for a fade animType? Lets say I was trying to just use a fade effect on one panel. Would my animData look like this "1 77 1 10 255 255 0 1" (77 being the panel id)? And then afterwards my color pallete will take take of the other fade effects?

Aliakbar Eski

For a fade effect you can use the fade animType directly. No need to provide an animData for fade. Its just for custom and *static* animTypes

Regards