{{current_hour}} Issue

More
8 months 6 days ago - 8 months 6 days ago #4612 by bitzerjd
{{current_hour}} Issue was created by bitzerjd
I have a macro that uses {{current_hour}} and it is returning the hour in 12hr format (3 in the afternoon, comes back as "3").  I set the system to use 24hr time and the "date" command in a terminal window shows the time in 24hr format?

30/11/2025 16:06:07.06 · DEBUG · Server.doCommand - If|IsGTE##4##08##If|IsLTE%%4%%23%%SetVariable|movielighting~normal
30/11/2025 16:06:07.06 · DEBUG · Server.Conditional - IsGTE? [4]>=[08]

Any idea how to get it to return the hour in 24hr format?
Last edit: 8 months 6 days ago by bitzerjd.

Please Log in to join the conversation.

More
8 months 5 days ago #4613 by Nillaz
Replied by Nillaz on topic {{current_hour}} Issue
{{current_hourmil}}
The following user(s) said Thank You: bitzerjd

Please Log in to join the conversation.

More
8 months 4 days ago #4614 by aa6vh
Replied by aa6vh on topic {{current_hour}} Issue
Just for further help in the future: I use the Server Dashboard to answer these types of questions.

Dashboard -> Management -> Server Variables

Then use the "filter" function, searching for "current" (no quotes, of course) with a filter type of "contains". Returns a whole list of server variables that may be of use to you (time/date variables in many different formats).
The following user(s) said Thank You: andrew

Please Log in to join the conversation.

More
8 months 4 days ago #4615 by bitzerjd
Replied by bitzerjd on topic {{current_hour}} Issue
Great tip... I was searching the documentation and couldn't find a list of variables.

Please Log in to join the conversation.

More
8 months 3 days ago #4617 by bitzerjd
Replied by bitzerjd on topic {{current_hour}} Issue
I wound up ripping out the Allonis logic and replacing it with the logic in a Home Assistant Script. The HA script made it easy to build nested conditional statements and edit them in a user-friendly UI. I have a ton of user created variables that I use to track state...with HA I can simply test for the state of the entity/device and use a simple if/then/else to do the toggle action.

What I do like is the power in both systems to do almost anything you can think of!

Please Log in to join the conversation.

More
8 months 1 day ago #4623 by David Li
Replied by David Li on topic {{current_hour}} Issue
Kinda like "snowboard vs. skiiing"...what you like usually depends on what you started with and got used to. But you are right...the combo of myServer and HomeAssistant is HUGE. Tons can be done. Glad you figured out a solution that works for ya.

Please Log in to join the conversation.

Time to create page: 0.181 seconds