Using device time as an input to trigger an icon

As stated in the title, I am trying to use Device Time as the input to a Low Beam icon; I want the icon to ‘light up’ at 7pm each night and ‘go off’ at 630 am each morning. I don’t have the headlight PID for my car, so the next best option is to simulate activation of the indicator during periods of actual headlight use so it at least looks real, right?

My path to get there so far is as follows: Low Beam Icon>Inputs and Values>Select Data Source>Device Inputs>Time (local). However, the value ranges give me nothing even close to information I consider useful in this context - the minimum was zero and the maximum in the 600k range. I’m not sure how I’d set this up as a ‘timer’ of sorts for my purposes.

Is there a way to do this, am I on that path, or am I barking up the wrong tree?

This has been done in the past but I’m not sure if I remember this correctly from top of my head.

But I believe that Local time is internally a seconds since midnight. So you need to create a trigger that uses local time as input and triggers if seconds is greater or less than your value.

Lets see.

  • 24 hours has 86400 seconds.
  • If you want to trigger at 18:00, that is at 64800 seconds
  • If you want trigger to be active until 6:00, that is at 21600 seconds

So your trigger is:

  • Trigger: If local time is greater than 64800 OR local time is less than 21600.
  • Reset: If local time is greater than 21600 AND local time is less than 64800

Then link an Action to the trigger to set the value. Hope this will get you started.