[APP][Pro] Better Logic Library - For Users

Ah, I missed that detail obviously! :face_with_spiral_eyes::face_with_peeking_eye::rofl:
I think I never understood the functionality of this card, and forgot about it’s existence (sorry for that).

And when using the expression card for whatever reason, it’ll just needs backticks for this to work.

True, but tbh, single quotes or double quotes should work to afaik.

Anyway, using the expression card for this is kind of a waist for performance. The string is already combined/finished by the default homey way of inputting text with tokens, and running the javascript engine to just return it as string/text is not needed.

I do like that backticks work like this though :face_with_hand_over_mouth:

1 Like

Hi all, I’m stuck and hope some people much cleverer than me can help.
I have a FIFO buffer for logging to Google Sheets. Sheets is quite finnicky about rate limiting so I built a rate limiter which feeds my log lines slowly to Google Sheets. This works well although it’s overly complex and I’m trying to simplify. This is where I get stuck. I have a function in BLL:
function(s) {
let a = s.split(‘|’);
return {gesplitst:a};
}
I then have a card


which takes the input from variable bll.arr.ratelimit.queue:
[“Koelkast|02-dec-2025 23:40:07|721.31|35||||||”,“Weer|03-dec-2025 00:00:00|Bewolkt|100|1010|4.8|6.6|88|⇑ ZZO 2|9”,“Verbruik|03-dec-2025 00:00:00|335|31574.116|5806.75|0|0|3||”,“Badkamer|03-dec-2025 00:00:00|45.4|22.5||||||”,“Keuken|03-dec-2025 00:00:00|58|20|2|159||||”,“Natte ruimte|03-dec-2025 00:00:00|45.3|22.5||||||”,“Zolderkamer|03-dec-2025 00:00:00|53.9|21.1||||||”,“Werkkamer|03-dec-2025 00:00:00|47.4|21.4|47.4|21.4||||”,“Energieprijs|03-dec-2025 00:00:05|03-dec-2025|2025-12|0,1|0,34|0,2631|0|0|”,“Hoofdslaapkamer|03-dec-2025 00:00:00|49|20.7||||||”,“Hal|03-dec-2025 00:00:00|50.7|21||||||”,“Tuin|03-dec-2025 00:00:00|24|11|36|0|60|0||”,“Woonkamer|03-dec-2025 00:00:00|17|18.8|6.6|9|0.0050000000001091|||”,“Koelkast|03-dec-2025 00:00:28|721.32|33||||||”]
and peels off one item such as [“Koelkast|02-dec-2025 23:40:07|721.31|35||||||”] and then feeds the result {“gesplitst”:[“Koelkast|02-dec-2025 23:40:07|721.31|35||||||]} to JSON Handler:

This is then ready to be logged to different columns in Google Sheets.

So this all works great, but I want to get rid of the BLL function since it’s hard to maintain, troubleshoot etc. So I’ve been experimenting with HomeyScript cards (but they don’t do objects or JSON as tag, only text/boolean/number, so that won’t work with JSON Handler) and BLL cards Execute BLL Expression (as tag) and Execute text (as tag), but whatever I try, I get identical-looking output but JSON Handler keeps saying
Missing token value: action::87796ea1-afd6-45f9-8c29-f71f07a1d6c6::text

How can I get JSON Handler to play nice?