Trouble with an using a for each

I have 2 pressure tanks for tennis balls... I'm trying to make a webcore piston that will check the pressure of each against the desired pressure

When I go and do the if condition and specify $device, I don't get the attribute pressure as an option

the TB Tank devices have an attribute for pressure

I have a difference webcore piston that I'm using and it had several door sensors and I could use the temperature from each of those...

Not sure what I'm doing wrong...

Temporarily add the real device in the statement so the attribute will show up, then you can remove it after your statement is complete.

you can also try to use, that may have a fix for this also

I tried both suggestions but unfortunately did not help.
I guess I'll have to make a piston and then duplicate it and update info.

Sorry more questions...
I'm trying to calculate the remaining time by subtracting an endtime from now
the endtime is an attribute on my TBTank device

Q1. There is no way to do the math {now} - TBTank EndDateTime ...right?

I think I have to set a DateTime variable equal to the device attribute...the thing is that its not available

I tried on also but same result... sorry its been a while since I did webcore but I don't think I forgot everything : )

You may be able to use and expression


The attribute is likely a string, and datetime should convert it to a datetime type.

Full logging may help

Q1. I think I tried what you I doing something wrong?

Q2. I switched to read the attribute into a string dt and then try your datetime function converting the string to a datetime variable...but that doesn't seem to work

Interesting, that device does not present standard ISO 9660 times...

  • it would have been nice if it did, as then they are easy to parse.

You may need to parse the string into pieces

ie you want to do a date('2023-05-30') and then a time('21:43:40'), then add the datetime=date+time

I'm not near a computer with monitors to play with this.

hmmm... looking at the driver

Do I need a T in front of the HH:mm:ss ?

The most common format is:


Usually there is a -0400 or some such at the end for the time offset from GMT

that function worked perfectly...thanks for the assist!!

so my application is to pressurize tennis balls for a specific pressure and for x days
On the driver page I input desired pressure and number of days

I want to create a tile that shows

Desired pressure: xx
Actual pressure xx
Remaining Time 4 days 8 hours

What is the best way to do that?
Does webcore somehow update an attribute or global variable and have something like Simple MultiTile display or is there a good way all within webcore to update a tile?

Thanks for any suggestions

Check this thread, see if it will work for you.

More whacky stuff... I'm trying to add a device to webcore ..I add it and update it
then click done
then i immediately go back in and its gone

its of the following type

am i doing something wrong?