How to display text variables???

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
apocalipsis1234
New user
Posts: 5
Joined: 03 Aug 2017, 23:41

How to display text variables???

#1 Post by apocalipsis1234 » 14 Dec 2020, 11:44

(Sorry for my English)...

What I want: publish in one oled display diferent texts depending on the value of a temperature...

How??? I have created a dummy device, and seems to do with "taskvalue"... problem: taksvalue and dummy device only support numeric data, so how can i do it (if possible)???

User avatar
Ath
Normal user
Posts: 3489
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to display text variables???

#2 Post by Ath » 14 Dec 2020, 14:20

For both OLed displays there are commands available to place texts on the screen, documentation on that is available here: P023 (wiki) and P036 (ReadTheDocs)
These commands can be used in Rules (enable from Tools/Advanced if not available as a tab)

Using P23 you could use something like this:

Code: Select all

on sensor#temperature do // Use the name of your Device taskname and variable
  if %eventvalue%<10
    oled,4,15,"Cold"
  elseif %eventvalue%<18
    oled,4,15,"Chilly"
  elseif %eventvalue%<22
    oled,4,15,"Comfortable"
  elseif %eventvalue%<25
    oled,4,15,"Warm"
  else
    oled,4,15,"Hot"
  endif
endon
/Ton (PayPal.me)

apocalipsis1234
New user
Posts: 5
Joined: 03 Aug 2017, 23:41

Re: How to display text variables???

#3 Post by apocalipsis1234 » 14 Dec 2020, 14:24

Thanks,i Will try

apocalipsis1234
New user
Posts: 5
Joined: 03 Aug 2017, 23:41

Re: How to display text variables???

#4 Post by apocalipsis1234 » 14 Dec 2020, 17:56

It works... thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 37 guests