How to use Time Variable Connector

First time user here. I'm using the simple automation rules to turn on a light at sunset and then turn it off using a variable time. When I click on variable option I get this popup that states "Time Variable Connector * Click to Set"
When I click on it there's a box that states "Update" Clicking it it does nothing. Can someone point me to the documentation that explains how to use/set this up? I've looked and can't find any good explanation.

Thank you,

Did you create a time variable in Rule Machine first? Then create a connector for it in the same place. That creates a virtual device of the same name as the variable -- that is the connector. Attach that to a tile in a Dashboard if you want.

Ah. I didn't install the Rule Machine app. Got it now.

Thank you,

I second this question. There was nothing in the simple automation rule that indicated that a variable time is something that has to be created externally and selected. The linked help page goes to simple lighting, not simple automation, but even the simple automation page has no details on variable time.

We are working to update the documentation, and more is coming soon on this subject for the 2.2.8 release.

To use a time variable for Variable Time in apps, you must create a connector for the time variable (it will have the same name as the variable). Then, select that device from the pull down in the app offered for Variable Time.

Changing the variable's value changes the connector's value, and adjusts the app accordingly. Changing the connector value does the same thing, and also changes the variable value. Variable and connector are two sides of the same coin.

I'm having an issue with a time variable displaying off by one hour. I set sunrise and sunset variables via a rule, and they have connectors. The variables show the correct times in Rule Machine:

However, on my dashboard, the times are an hour off--maybe they're displayed as standard time rather than daylight saving time?

If I change the tile from "variable time" to "variable string," the time is correct, but I get unwanted verbiage:

Any thoughts on how to correct this? Thanks.

We will look into it.

Hi Guys I am having an issue setting a variable time from a dashboard as well.

I have set up the connector and placed the variable time on my dashboard, I can set the time in RM and display it on a dashboard.

When I change the time from my dashboard it changes back to the original time set in RM.


Which version of RM? What hub build? Hub Variable, Global Variable or Local Variable?

Hey Bruce,
Thanks for your reply.

Hub Build
RM Version 5.0
Global Variable created with RM Legacy.

Perhaps you should switch to a Hub Variable and RM 5.0. There were changes made to the Dashboard templates. Rather than try to sort that out, creating new would make more sense.

Thanks Ill give it a go and let you know.

Is the correct comparison for current time %time% ?

No. %time% is a string used in messages. There aren't any time comparison's per se.

What are you trying to do?

I want to turn a lamp OFF based on the variable time = to current time.

so I tried

If Variable Time = %time% then Lamp OFF

Is there some reason you don't want to just have a trigger at the Variable Time, and have that turn off the lamp?

I need to see more context to understand what you're trying to do. What triggers this rule?

There are time comparisons.

I'm not sure how to do that !

Could you possibly give me a code example as per below....please

Lamp ON at Sunset
lamp OFF when time = Variable time set



One way below. The DateTime variable needs to have a Connector created for it, as that is what you will select in the Wait for Event:

Trigger:  Certain Time: Sunset
   Lamp On
   Wait for Event: Certain Time (your variable)
   Lamp Off

Or, you could do it backwards:

Trigger: Certain Time: (your variable)
   Lamp Off
   Wait for Event: Certain Time: Sunset
   Lamp On

Like this

Thankyou for your help Bruce,

That seems to be working perfectly.

It is a simple automation but I didn't know the correct syntax and steps to take.

Appreciate your help.