FACER Community

Sunrise/sunset/day time

I have a face where I’m trying to have a different lume in AOD after sunset/before sunrise, than during the day. I’m using the expression -

$#DISDAYTIME#=1?0:100$ 

…to hide one of the colours during the day. It works in the app, but it only works on my watch if I restart it each time - in other words, it only seems to detect the state (day time or night time) when I reboot the watch.

Anyone got any ideas on how to fix this?

This is the face if anyone wants to see how it reacts for you, after dark. Supposed to be white lume during the day, and cyan at night.

2 Likes

The DISDAYTIME tag only works on Tizen watches when you use =0 or =1. You must use $#DISDAYTIME#=false?100:0$ or $#DISDAYTIME#=true?100:0$ for it to work on WearOS. @russellcresser has posted that the short disdaytime hasn’t been working very well and he posted a longer version that I have found to work flawlessly. Here is his version:

Day: $(((#DH#) * 60)+#Dm#)<(((#WSH#) * 60)+#WSm#)&&(((#DH#) * 60)+#Dm#)>(((#WRH#) * 60)+#WRm#)?100:0$

Night: $(((#DH#) * 60)+#Dm#)<(((#WSH#) * 60)+#WSm#)&&(((#DH#) * 60)+#Dm#)>(((#WRH#) * 60)+#WRm#)?0:100$

8 Likes

That is actually the short version of the Long Formula .

The one below even works on a TickWatch .

These lines of Code came from @ThaMattie I think . Lots of people on the Community have tried to come up with something Faultless.

$(((#DH#)*60)+#Dm#)<(((#WSUNSETH24#)*60)+#WSUNSETM#)&&(((#DH#)*60)+#Dm#)>(((#WSUNRISEH24#)*60)+#WSUNRISEM#)?100:0$

5 Likes

Thanks folks. I’ll give this a try tonight. It’s annoying that you can only try it after sunset to see if its working. :rofl:

2 Likes

We used to be able to run the Time Machine on the Apps but that has gone now . You need a Buddy in Australia that has the same watch as you. I can give you a 3 hours before test if you need one on a Samsung Active ??

You can just do this . Works on my watch .

3 Likes

@richiebee. Rrich. At the Head of the Topic. Your line of Code is Half Italic I did not notice before. Bad format for Facer Code .

1 Like

I don’t understand. How does it get that way? I’m just pasting it in from Facer Creator? It’s not italic there. Is it something that the forum is doing?

1 Like

That’s one smart expression! I love its brevity!

1 Like

Yeah Rich @richiebee Blame Facer . I just wondered if it went on to your watch with that formatting . You might not see it in Creator . Protect code you post here from being formatted with the </> above select the code and then click the Icon .

$#DISDAYTIME#=1?0:100$

I copied that and pasted it into a RTF. and it came out Italic . In Notepad it is Straight . So it obviously got a bit of formatting somewhere . I will test it in a draft .

I am running that on my watch tonight . I really do not thing That is the problem . remind me which Watch you have .I know you have told me loads of times .

2 Likes

OK so that is what that does. I never messed with it before. I will have to start using that in the future!

1 Like

When you Post The message it comes out red . When you copy the Code the Quote marks are Deleted when you Paste It . Now You Have To Tell Me How To Post A Quote . I have Not Done That Before on Purpose.

1 Like

You should only use 1 backwards quote for preformatted text.
The triple backwards quotes seem to be code highlighting, and it is treating # as the “remarks” symbol, which makes it italic grey. I think it’s Python.

"""
text
"""
# comments
x = 10
1 Like

@ThaMattie So are you saying the </> is not the way to Protect Code and Highlight it .

@richiebee . Both worked on my Active .

Screen_20220613_212228

Pretty sure that button uses the correct quotes. I just type them myself…

1 Like

Moto360 3rd Gen. It seems to be pretty generic version of WearOS and doesn’t have problems that I see specific watches have sometimes.

1 Like

Yeah Ticwatch seems to be the most Tetchy. There is quite a lot about #DISDAYTIME# dotted all over the Community. Great if it works. The Grunt Expression is only a Copy and a paste away. I store them all in Notpad so they don’t get corrupted. Ha Ha.

1 Like

Alas, it didn’t work. I guess its my watch. :frowning: Same thing - works if I reboot it, and its after dusk. I guess I need to use a different tag. I’ll try that longer one from the @ThaMattie @mrantisocialguy and @russellcresser that uses the sunrise and sunset tags. I know my watch recognizes those tags at least.

1 Like

If you highlight the part you want to quote and then just reply to the post you just highlighted it will show up just like above. Below is the screen capture of me doing it for your comment.

1 Like

Oh I see. I have actually done that by accident before. Great. So it is almoust Automatic. Difficult on a Tablet In Bed… Any way learn something every day so this is a good start.

1 Like