# CMD Factory Input

**URL:** <https://discourse.nodered.org/t/cmd-factory-input/66519>\
**Category:** General\
**Created:** [16 August 2022 21:54 UTC](https://discourse.nodered.org/t/cmd-factory-input/66519 "2022-08-16T21:54:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bucks7756](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@bucks7756](https://discourse.nodered.org/u/bucks7756)\
**Post date:** [16 August 2022 21:54 UTC](https://discourse.nodered.org/t/cmd-factory-input/66519/1 "2022-08-16T21:54:31Z")

</div>

I hope this is simple. I'm reading a value from a tag that has an integer value. I need to pass that into command factory to a multi-level switch to control dimness. I get an error that it needs to be an array. How do I format that. If I use an inject with a value of "[40]" that works?

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 August 2022 22:03 UTC](https://discourse.nodered.org/t/cmd-factory-input/66519/2 "2022-08-16T22:03:28Z")

</div>

> [@bucks7756](#):
>
> I hope this is simple

No, not at all!  
Welcome to the forum, but your explanation is not clear.

> [@bucks7756](#):
>
> I'm reading a value from a tag

What is a tag?

> [@bucks7756](#):
>
> command factory

What is command factory?

> [@bucks7756](#):
>
> I get an error

What is the error?  
Copy/paste the error.

Please explain in more detail what your issue is.

---

<div class="post-metadata">

**Author:** ![bucks7756](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@bucks7756](https://discourse.nodered.org/u/bucks7756)\
**Post date:** [17 August 2022 02:06 UTC](https://discourse.nodered.org/t/cmd-factory-input/66519/3 "2022-08-17T02:06:39Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/2/a25938def4dea3ccf053578f076ffda8dff4f3c0.png)  
I'm reading a tag from Ignition. Let's say for example the tag is the number 40. It should set the level for the light to 40. If I use the inject input with [40], it works. How do I format the value coming from the ignition tag from 40 to [40]?

---

<div class="post-metadata">

**Author:** ![bucks7756](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@bucks7756](https://discourse.nodered.org/u/bucks7756)\
**Post date:** [17 August 2022 02:12 UTC](https://discourse.nodered.org/t/cmd-factory-input/66519/4 "2022-08-17T02:12:58Z")

</div>

Never mind. I figured it out. Had to put payload in brackets.

---

<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:** [31 August 2022 02:13 UTC](https://discourse.nodered.org/t/cmd-factory-input/66519/5 "2022-08-31T02:13:05Z")

</div>

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