Logic Machine Forum
Multistate value - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2)
+--- Thread: Multistate value (/showthread.php?tid=3251)



Multistate value - Alexander - 25.03.2021

Hi,

Can someone tell me what datatype I have to use for multistate value?





RE: Multistate value - admin - 25.03.2021

Use 1-byte unsigned with Custom values to map numeric value to text.


RE: Multistate value - Alexander - 25.03.2021

(25.03.2021, 08:37)admin Wrote: Use 1-byte unsigned with Custom values to map numeric value to text.

Can you please show in an example?


RE: Multistate value - admin - 25.03.2021

See this: https://forum.logicmachine.net/showthread.php?tid=2731&pid=17624#pid17624


RE: Multistate value - Alexander - 25.03.2021

(25.03.2021, 08:45)admin Wrote: See this: https://forum.logicmachine.net/showthread.php?tid=2731&pid=17624#pid17624

Hi,

I have tried this, but this doesn't work.
When I change value in LM it doesn't change for the device.



RE: Multistate value - admin - 25.03.2021

Why are you writing multiple values one after one?
Keep only one write and replace value = 1 with value = event.getvalue() so you actually write the current object value not a fixed value.


RE: Multistate value - Alexander - 25.03.2021

(25.03.2021, 10:56)admin Wrote: Why are you writing multiple values one after one?
Keep only one write and replace value = 1 with value = event.getvalue() so you actually write the current object value not a fixed value.

Because I am new with this Lua scripting, that is why Wink
Thank you, this helped