Yes, you can pick any textfield as status indicator.
But no, unfortunately i cannot control colors of text.
Yes, you can pick any textfield as status indicator.
But no, unfortunately i cannot control colors of text.
As Arie already mentioned, different colors are not possible, but itâs possible to use Emojis: / /
I already do
Arie, I already get stuck at the first bulletâŚ
How to create a BLL function?
Do I have to place the code as text into the card?
Thanks
Fred
No.
Goto the BLL app settings
OK. I see Functions > Add function over there. Is that what you mean?
I like the high degree of configurability of this app! You may expect some questions when I start to discover the functionality
Yes!
Edit: i have updated the post you referenced.
I see quite some ways to control the datetime format.
For my project I want to add the time of receipt of an MQTT message to my data. I now do that in a human readable format, but I also want to do it as âepochâ / (micro)seconds since 1/1/70. Does BLL offer a way to do that?
BTW: now the current datetime is automatically generated by the Google Sheets card that I use for exporting my data. I will need to get the current datetime in a different way before I do the conversion to epoch.
EDIT: I found this discussion, this will give me the thing I look for when I let it return unixTimestamp
In BLL, just use now
.
In which card?
Just try a few?
What do you want?
The time in a variable or tag?
What do you want to do with the timestamp or tick?
If you want a tag for instance, use the Execute BLL expression as Tag and fill it with now
.
I want it as variable. Or better: as something that I can export to a Google Sheets workbook. I succeeded now to do this with a BLL card that can execute code.
Hiyas @Arie_J_Godschalk and others,
can you tell me if there is a BLL string operator for âcontainsâ?
or possibly even better, is there a repository with all functions and syntax?
Yes, check the app settings. Goto the link for Lodash. There you will find an operator for contains.
Altho i think "blabla".contains("b")
might already work or "blabla".indexOf("b")>-1
Heeey, wonderful, thank you @Arie_J_Godschalk.
I couldnât find a contain command but that âindexOfâ is working. Here is an example that checks if bot Pref2 and Pref3 are not in text1. For those that need one
This is a BLL logic evaluation card, btw.
Woah, wouldnât have found that in the Lodash list. Look at this:
@Philippe_Mucher
_.includes('abcd', 'bc'); // => true
Ow yeah! Did not see that one. Thank you, @Arie_J_Godschalk !!
When someone is going to sleep, Homey provides the name of that specific person in the Name tag (Naam in my Dutch version). This tag contains the full name (first name and surname). I am trying to extract the first name from that tag via an expression in the BLL execute expression card. However I do not seem to get the expression right.
Note that I have very little knowledge of javascript, so I am learning as I go and trying to combine the various pieces of the puzzle.
To get the first name part I assume I need to use the substring method. And the indexOf method to determine the position in the string where the first name ends.
I tried the following, but I get an error:
As far as I can tell I have included all the necessary parentheses and I assume the expression itself is not correct. Problably the way I am refering to the tag/get the substring of the tag.
I also tried refering to the tag using:
tag(Naam).substring(1, tag(Naam).indexOf(" ")-1)
But that results in the same error.
I hope someone can point me in the right direction.