# Set NR Control Device amount to payload

**URL:** <https://forum.ewelink.cc/t/set-nr-control-device-amount-to-payload/74282>\
**Category:** eWeLink CUBE\
**Tags:** ihost\
**Created:** [October 14, 2024, 8:44pm UTC](https://forum.ewelink.cc/t/set-nr-control-device-amount-to-payload/74282 "2024-10-14T20:44:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eerke](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@eerke](https://forum.ewelink.cc/u/eerke)\
**Post date:** [October 14, 2024, 8:44pm UTC](https://forum.ewelink.cc/t/set-nr-control-device-amount-to-payload/74282/1 "2024-10-14T20:44:48Z")

</div>

This might already be possible and I can’t figure out how to do this.

I’ve created a virtual curtain (actually a blind connected to Home Assistant via MQTT). The event node can easily send out an integer 0 to 100 over MQTT, but I can’t figure out how to set the device to an incoming MQTT. I’ve ended up using a switch node to send different amounts to different device control nodes because I can’t figure out how to get the msg.payload from the MQTT into the device control node. Is this even possible in the eWeLink Cube Palette? If it isn’t then having a set msg.payload to set value tick box is my suggestion. I realise you’d need to check the msg.payload was a number and a reasonable number and then not bother doing anything but throwing an error if it wasn’t, but that’d be up to us to debug.

---

<div class="post-metadata">

**Author:** ![eerke](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@eerke](https://forum.ewelink.cc/u/eerke)\
**Post date:** [October 14, 2024, 9:09pm UTC](https://forum.ewelink.cc/t/set-nr-control-device-amount-to-payload/74282/2 "2024-10-14T21:09:10Z")

</div>

Or instead of a payload I could easily create a flow or global variable, but I can’t figure how to get it into the control device node.

---

<div class="post-metadata">

**Author:** ![eerke](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@eerke](https://forum.ewelink.cc/u/eerke)\
**Post date:** [November 8, 2024, 10:39pm UTC](https://forum.ewelink.cc/t/set-nr-control-device-amount-to-payload/74282/4 "2024-11-08T22:39:16Z")

</div>

If it is a virtual device you have registered with a register device node you can use a template node put (example of curtain) that links to a ‘put device state’ node

```auto
{
    "percentage": {
      "percentage": {{payload}}
    }
  }

```

shows it is already possible and just needs to not just be virtual devices
