# Setting ui from tasmota not working

**URL:** <https://discourse.nodered.org/t/setting-ui-from-tasmota-not-working/38487>\
**Category:** Dashboard\
**Created:** [4 January 2021 01:37 UTC](https://discourse.nodered.org/t/setting-ui-from-tasmota-not-working/38487 "2021-01-04T01:37:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanSchmelz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefanschmelz/32/25894_2.png) [@StefanSchmelz](https://discourse.nodered.org/u/StefanSchmelz)\
**Post date:** [4 January 2021 01:37 UTC](https://discourse.nodered.org/t/setting-ui-from-tasmota-not-working/38487/1 "2021-01-04T01:37:40Z")

</div>

Hi,  
I use the node-red-contrib-tasmota to control my devices. I want to set the color of a color picker from the output of this device.

I have set my color picker to output an object. I have written a function to convert the array of numbers the tasmota nodes returns to an object that looks like the one outputed by the color picker.

let res = {  
h: msg.payload[0],  
s: msg.payload[1] / 100,  
l: msg.payload[2] / 100  
}

The hue gets set to red and lightness gets set to 0, but the color changes correctly, so the reverse way works

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 January 2021 09:55 UTC](https://discourse.nodered.org/t/setting-ui-from-tasmota-not-working/38487/2 "2021-01-04T09:55:59Z")

</div>

> [@StefanSchmelz](#):
>
> The hue gets set to red and lightness gets set to 0, but the color changes correctly, so the reverse way works

Sorry, I don't understand that statement, or what question you are asking.  
Also show us the input to the function node (as shown in a debug node), the output from the function node, and what output you expect.

---

<div class="post-metadata">

**Author:** ![StefanSchmelz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefanschmelz/32/25894_2.png) [@StefanSchmelz](https://discourse.nodered.org/u/StefanSchmelz)\
**Post date:** [18 January 2021 00:18 UTC](https://discourse.nodered.org/t/setting-ui-from-tasmota-not-working/38487/3 "2021-01-18T00:18:29Z")

</div>

I solved it myself. I has some typos.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 February 2021 00:18 UTC](https://discourse.nodered.org/t/setting-ui-from-tasmota-not-working/38487/4 "2021-02-17T00:18:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
