Watch Face Studio - Expressions not updating on watch face

Hi All,

Hoping you can help me out, i developed a watch face with alternating AM/PM Images with Text on top similar to this design:

Starfield-Chronomark-Watch.jpg (1200×675) (twinfinite.net)

To get this alternating i applied an expression to the opacity of the image:

AM - ([HOUR_0_23] <12? 0:-95)
PM - ([HOUR_0_23] <12? -95:0)

In the preview when you drag through timeline they interchange exactly as intended and initially on running on device it seems to display, yet the next day it gets dropped completely. When re selecting the watch face it pulls through again and then drops next day again.

Any thoughts on what i have done wrong here. Appreciate it could be simpler to just have one button with AM/PM displayed, but it looked very cool having them alternate and be close to transparent when not that time of day.

It shouldn’t matter, but you might try using the IS_AFTNOON (AM =0, PM =1)tag instead, and switch around the opacity values to positive numbers.

AM would become ([IS_AFTNOON]==0?100:5)
PM is then ([IS_AFTNOON]==1?100:5) or ([IS_AFTNOON]==0?5:100)
don’t forget to change the default opacity for the image to 0

Using this tag also has the benefit of working as intended regardless of 12 or 24 hour format. As said, it shouldn’t matter but I’ve solved “buggy” problems like this by coming at the problem from a slightly different angle.

1 Like

Great suggestion. I will update it now and let you know tomorrow if still functioning. Thanks Bruce

So it worked in previs when doing the following:

AM - ([IS_AFTNOON]==0?100:-95)
PM - ([IS_AFTNOON]==0?-95:100)

Assuming it’s because it alters the opacity value rather than give it the result of the opacity you want. But works as intended.

Thank you again, i will check to see if it retains the expression over a day or two

Glad I could help. My gut says your code will work as intended with the negative opacity values, I suspect that the original expression failed when the hours tag rolled over, perhaps a flag isn’t getting set/cleared?

Another idea to try if you feel like playing with the code some more: try your original expression but use the [HOUR_1_24] tag instead of [HOUR_0_23]. All three variations of tags ([HOUR_0_23], [HOUR_1_24] and [IS_AFTNOON] should work with the appropriate tweaks to the ternary conditionals, so if one tag combo works and another doesn’t it might point to a bug in the latest WFS release.

I’m sure a more experienced member can shed some light on this, I for one am looking forward to your results!

Note the opacity value (as about every values with expression field) is composed of two numbers. The first is there by default before you start playing with tags
image

plus the result of inserted expression. So if you leave the default 100 in place, you have to adjust your expression so that it counts with it, or you set it to 0 and get both values just from the expression it self.
image

1 Like

If you want components to appear only for AM or PM, it’s rather simple.

For any component, go to the opacity value in parameters (Peter shows an example in the image he posted.)

Here’s my formula for AM, (Opacity at 100):
([IS_AFTNOON]*-100)
Basically, when it is PM, the opacity becomes 0. (100 + (-100) = 0.

For any component to appear during afternoon (PM) (Opacity at 0):

([IS_AFTNOON]*100)

If you want these components to only appear when it is in a 12H format you add this:

Initial opacity: 0
([IS_24H]*-100)

For example, something to appear during PM at 12H Format would be:
Initial opacity at 0
([IS_24H]*-100) + ([IS_AFTNOON]*100)

And of course, if you want a component to only appear when it is in 24H format:

[IS_24H]*100