There is a small dial at the bottom of the face that’s supposed to rotate to point to either day or night.
The rotation code is
(180*(#DISDAYTIME#==false))
It seemed to work in Creator when I first made the face, but it didn’t work on my watch, so I took another look at it in Creator and no matter what time of day it was #DISDAYTIME# yielded false, so the expression returned 180*0 which meant no rotation leaving it perpetually pointing to night.
But the strange thing, if I changed the date in creator to the day BEFORE the actual date, the expression worked as expected rotating the dial to daytime during the daytime hours.
Any advice?
-Warren
I don’t know what is going on in the backstage of creator, but on my page when I put on face a text field with #DISDAYTIME# tag in it, it returns true only on the current day. If set the time slider on noon it says true, whenever I change the day in time machine into past or future, it changes to false.
For trying it on watch I would insert such text field to directly show what is the tag returning. And for the turning I would try option $#DISDAYTIME#==false?180:0$
This code doesn’t make any sense; you’re sort of saying “180 times true equals false” so your watch doesn’t know what to do. petruuccios gave you the almost the right conditional $#DISDAYTIME#==false?0:180$
which means “if daytime equals false, turn it 180 degrees; if not, zero degrees” (the nighttime icon is on top of the .png, so it should be 0 at night). Alternatively you could also do $#DISDAYTIME#==true?180:0$
which is saying the same thing but inverse. See this guide for more detailed info
I always have trouble remembering the syntax of conditionals, so I find using mathematical expressions easier. And it does work. If it is after sunset (#DISDAYTME#==false) is true and returns a value of 1 which when multiplied by 180 rotates the disk 180 degrees so that the night sky is on the bottom with the pointer pointing toward it. If it is daytime (between sunrise & sunset) #DISDAYTIME# yields a value of true, so (#DISDAYTIME#==false) is false and returns a value of 0, which when multiplied by 180 is 0, so the disk does not rotate. It may be unconventional, but I assure you there is no flaw in my logic.
As regards the issue I had getting it to work in Creator, it worked when I first designed the watch face and it worked today, so Creator had some kind of glitch yesterday.
As regards the issue of it working on my watch, which is a Galaxy 4 watch, I did as petruuccios recommended and put #DISDAYTIME# into a text box and discovered that #DISDAYTIME# returned a value of “false” even when it was the middle of the day, so the problem is my watch not handling #DISDAYTIME# and not my coding.
Thank you eveyone for your input and advice. Even though it doesn’t work correctly on my watch, I hope it’s working on the watches of most who chose to sync it.
-Warren
By that logic, you don’t need the ==false
then. You can just put (180*(#DISDAYTIME#)) since #DISDAYTIME# will either be 0 or 1. But I just tested your watch, and it didn’t work. I then created my own watch using both your code and (180*(#DISDAYTIME#)), and no luck there either. But petruuccios’ solution works fine for both rotation and opacity. If it consistently worked on your device in the past, it may not be pulling sunset info from OpenWeatherMap and a simple permissions check and a watch restart might fix it. But I think this may be an example of a shortcut taking more time than it’s saving
Sometimes #DISDAYTIME# does not work on some watches .
Mattie @ThaMattie recommended a long hand version for those watches . It is Worth a test.
As @pandaKrusher has pointed out . (180*(#DISDAYTIME#))
works fine No Boolean Necessary .
$(((#DH#)*60)+#Dm#)<(((#WSUNSETH24#)*60)+#WSUNSETM#)&&(((#DH#)*60)+#Dm#)>(((#WSUNRISEH24#)*60)+#WSUNRISEM#)?100:0$
I guess I thought the topic was done once I discovered that my watch was having a problem with #DISDAYTIME#, but I see I’ve opened a can of worms with my use of math instead of conditionals. That (180*(#DISDAYTIME)) would yield the same results as (180*(#DISDAYTIME==false)) is an interesting point that I’d need to play with. I’m sorry to hear that this math instead of conditional approach does not work on pandaKrusher’s watch since that ended up not being the cause of my problem.
I have used that approach on other watch faces and haven’t had any complaints that they don’t work.
For example this face
uses the math instead of conditional in the opacity fields of the date graphics. It certainly works well on my watch. I’d be interested to know if it doesn’t work on someone else’s, in which case I’ll have to push myself to remember the syntax of conditionals.
-Warren
Math isn’t the issue here, it’s the syntax. The opacity field is looking for a number, 0 to 100. With the watch link provided above, I think you’ve cleverly stumbled on a workaround conditionals, maybe accidentally. May’s opacity is (100*(#DM#==5))
, “100 times true”, or 100 times 1, so 100%. But that’s not the case for the day/night dial you originally posted, where the rotation is (180*(#DISDAYTIME#==false))
: 180 times 1 equals false. I think putting words in a field that’s expecting numbers is what’s messing it up. #DISDAYTIME#
by itself spits out “true” or “false”. #DISDAYTIME#==false
does not. If you can’t flip the image, I would recommend changing it to (180*(#DISDAYTIME#))
; I bet it will work on your watch.
Nobody memorized the conditional syntax at first glance. Everybody referred to a cheat sheet, in my case for months. There are really only four core segments:
$
- if
#
- tag (you know this already)
=
- is
?
- than
:
- if not, then
There’s also and
and or
but worry about that later, when you need them. Once you get comfortable with conditionals it really opens up the possibilities. For example, a sequence with an X of:
$#DISDATYIME#=false&&#DD#=341&&#ZHR#>100?160:999$
Would say, if it’s nighttime and it’s my birthday and my heartrate is over 100 BPM, play this animation of a dancing monkey. The watches practically make themselves at that point
In spite of all your advice, which is appreciated, #DISDAYTIME# still yields false on my watch even at 3 PM, so…
Permissions where? On the phone? on the watch? Where do I find OpenWeatherMap?
Thanks
-Warren
Open Weather does not provide a Map to Facer . Having said that it is worth Having their app on your phone . The general feeling is that if it is finding the Weather Data for itself it is also finding it for Facer. You reminded me that SR SS data comes from them . I am very fond of the SR SS data on the face I wear most of the time . Sometimes if I am testing a Google Store Face when I go back to my Facer Face the Data is missing . Although it will come back if I wait my Impatience makes me Reboot the Watch and all is fine .
Just to repeat myself #DISDAYTIME# does not work on all watches . Do a test with just that tag in a TEXT box . Remind us which watch do you have ?
I have a Samsung Galaxy 4. I did the test with the text box which is why I said it shows #DISDAYTIME# yielding false even in the middle of the afternoon. And that is what I figured the problem is. The watch face works as expected in Facer Creator except for the one day when it seemed to be off by a day.
-Warren
I have a GW4 Classic and have no problems with #DISDAYTIME#. As far as I know on Creator #DISDAYTIME# only works for the current day on the Time Machine slider and it is L.A. SR SS.
.
.
So this is strange. #DISDAYTIME# seems works but not SR SS. I suppose true is default. Who Knows.
I seem to remember if I swapped a Facer Face on my watch the SrSs data was retained. Since the Last update it seems all Open Weather Data is wiped for each Face it seems like waiting about 20 minutes sorts it itself out.
.
.