[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

Enclose the [device:attribute] in decimal() or integer(), depending on output you want.

Then there might be a bug in the code because this is pulled straight from the wiki. @ady624

Changed it to this and it now works. This one uses 0 decimal places.
Thanks for the help guys. :slight_smile:

Well as long as it works then cool!!

1 Like

Alright I have updated the wiki weather page with 4 new categories. You can now reference the following 7 categories easily from the wiki.

1. Alerts
2. Almanac
3. Conditions
4. Forecast
5. 10 Day Forecast
6. Hourly
7. 10 Day Hourly Forecast

I also tried to make the titles a little more understandable instead of the shorthand code used. I apologize if the descriptions on some of these are short but I am not weather man. Anyways enjoy the wonderful weather attributes available now.

JAVA’s printf is very picky on what is passed to it, make sure you pass a float/decimal - maybe put a decimal() around the value

I was just about to mention that too. I was having issues getting the format to work correctly myself on the Piston Tile but formatting exactly like your post helped me a lot. I was using it for a temperature tile I have to show no decimals.

Looking for some help with multiple tiles in one piston. I want them to show one color when on and another color when off. I can’t get the formatting right to that within one expression. I can get the piston state to show it, but not tile. Can someone assist with the format?

Switch the color field to an expression and use

condition ? ‘Red’ : ‘Blue’

You can also use hex codes #ff0000 etc

I’m not getting this right. I often overthink things. Here’s my "dream piston"
on events from basement lamp
turn tile white on blue when on
turn tile blue on white when off.
But I’m only getting the concept by doing it in two expressions. So one tile at a time. I’d like to show all of my light status in one piston. Just getting the tile concept down, but having problems with overthinking the scenario. (sigh)

So looking for feedback on these two pistons.The first one was the original one I had asked about. The second one is the attempt to recraft it have some suggestions from @ady624. Do they do the same thing? Is one better than the other? I’m not a coder or programmer, so looking for the reasons why one might be advantageous (if they even fundamentally do the same thing).

Original

Revised piston

The only thing I would ask is why are you using variables for your sunset and sunrise.
You can use presets.
Use virtual - time then in the value click on the box and choose presets.
You can then also do offsets.
Horses for courses.

You can do something like this. Was an example for someone else so just change the set cooling point to something else

Thanks for the response Bob. Ady624 mentioned the variables and presets thing originally also, and I guess I have to ask a really obvious question. What is the difference between the two?

–Jamie

From reading lots of posts about webCoRE I think it’s just a cleaner way of doing it.
It makes it easier to put in offsets to the time without having to have knowledge of the coding etc.
Lots of ways to skin that cat. :smile:

Use the variables if you are wanting to output to a message or something. Use the presets for the computing

Ok, that is just … AWESOME! That word … Awesome … really doesn’t cover it, Thanks so much!

Yeah just ran into that. I have global variables set for my kitchen(5 lights) and living room(6 lights) lights. I tried to add them to the devicelist, but did not realize that it totaled 11 lights instead of just 2. So when I added all my different rooms(lights) it totaled 24. So i went back and deleted the kitchen and living room lights and made virtual switches for them. But can’t get rid of the orphaned lights. Just deleted piston and started over.
Great work tho!!!
p.s. That’s what great about variables…it’s easy to start over!:grinning:

Now I’m wondering if I invest my time here and build a dash rather than ActionTiles. It’s a lot of work but I’m loving the ability to customize the tiles on webCoRE and the updates just keep on coming. The latter is just not there yet in ActionTIles.

The visor will natively have access to piston states and piston tiles - so yeah, they’ll be there. Thinking of also adding support for sliders in the piston tile. Device tiles will definitely have support for level, color, stuff. Proxying devices through pistons will allow for the customization you are already enjoying though :smiley:

Also, the visor has support for real time updates so piston states will be updated much faster - the dashboard itself checks for updates every 10 seconds, does not use websockets for live updates.

3 Likes