Hubitat hub variable filled with google sheet cell using api do not return the entire cell content

,

Hi,
I use the power api to get a cell value inside hub variable. Its working fine but I get something weird. The cell value is filled with some events from my calendar (I have a macro that extract events from calendar and sort it).
then I use a formula to concat like this: Start: time, end:time, duration: duration, title:event title, calendar: calendar name

its working well but for some events, the end of the event is in the cell but not transmitted to the variable.

For an event in particular, the cell contain all that information but the variable countain : start, end, duration

Why for some event its ok and for another one it only takes the half of the text?
Any ideas? My variable is set to string type and for other event its ok with time value and numbers for duration...
Thanks!

I think more information would be helpful to get a better idea of how to solve your problem. Notably, how are the contents of this variable getting set? Do you have a rule (or other app) on your hub doing so? If so, sharing that rule (or app) may be helpful. If it's something outside the hub setting the value of this variable (I'm not sure if you're getting or setting the value via Maker API -- which is what I assume you mean), sharing more information about that may also be helpful, though in that case it is possible the problem lies outside the hub.

thanks for reply!
Yes, I use the maker api from inside the hub. Here the link to the step I followed to make it work

Its working fine, but I just dont understand why sometimes the cell content is not fully sent to the variable. (even if I try multiple time)
The cell content is generate with a simple concat formula.
Its almost all I can tell,
thanks again!

It's hard to say without seeing more, but I'd turn on all logging for MakerAPI and maybe the variable connector to see what hints it gives about the data coming in. If it's very long (over 1024 characters or so, I think), that could also be the problem.

I ll check on the log but the length is not a problem since its working for other events that are far longer! I tough it was a variable type issue (string) so the number wont follow but its working on other events again...

the logs looks good (some error but not related) as you can see, some events do not have title and calendar name...

I think I found it! Within my concat formula, when comes the duration, some events gives 0 and other a number of minutes... I just add text() function in the formula to return those numbers as text and it works!
I knew it was a variable type issue but I was not aware that 0 is not considered as number...
Thanks for your help!

1 Like