This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[Solved] Logica, How do I add a variable to a (text) string?

VonkenboerVonkenboer Member
edited August 2016 in Questions & Help
Hi,

Just a noob question, how do I add a Logica variable, which is set in flow one, to a string in flow 2?

Tried $var_name, {{$var_name$}} which doesn't seem to work. Probably it's simple and documented but I can't find it. Please help me out here...

Comments

  • Fire69Fire69 Member
    edited August 2016
    It's {{{$var}}} if I recall correctly. 
    Remove the underscore, didn't work for me either... 
  • VonkenboerVonkenboer Member
    edited August 2016
    Wow, that's a fast response! Thanks!
    What do I have to use? $varname or {{$varname$}}? Can give you me the syntax?
  • You define it with a logic card, just use varname. 
    Then you can use it in for example a speech card like 'the content of variable is {{{$varname}}}' 
  • Okay. Clear. Thank you very much!
  • Interesting, I'm new to working with variables and varnames. Can you share a practical example how you are using this feature?
  • VonkenboerVonkenboer Member
    edited August 2016
    I using the Telegram app, made by jorden, to send log and device states. Also using it for status updates from communications between my Fibaro HC2 controller and the Homey.
  • Can you use a variable in a telegram message? i can't get it to work :disappointed: 
  • VonkenboerVonkenboer Member
    edited August 2016
    I use the Better Logic app to do that. The examples shows a flow I made for testing/logging changes of variables. It will store a telegram message into a variable and one second later (delay) it will be reset with a <space>


    The card underneath the  if column is filled with a space, to block second messages when I handled a string-variable  I will reset it with a <space>. (a trigger will not be activated when you send a Telegram with the same message content, so I have to reset it every time).


  • I prefer using Better Logic also, but unfortunately you can't use them in every action card. That's how I learned about the build-in variable function. 
Sign In or Register to comment.