Announcement

Collapse
No announcement yet.

I can set time, but what about date? hs.EventSetTimeTrigger(Evref, EvntTime)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mrhappy
    replied
    Well EventSetTimeTrigger accets a .net type of Date so you could pass it a date, quite what it does with that is anyones guess I would imagine that it ignores it as specific date/time events are not that common in HS (as opposed to one which ran at the same time as each day) however I don't know. I also thing that there was a bug at one time with this command that if you sent multiple calls to the same event then you would get the times added onto the event rather than replaced.

    Leave a comment:


  • I can set time, but what about date? hs.EventSetTimeTrigger(Evref, EvntTime)

    I have a script to turn on my previously lit outdoor lights. Now, when that script runs, it creates an event to turn off the lights a at certain time depending on the period of the year.

    ie: Cristmass lights are on later around the 25/12~1/1 but turn off earlier at the begening of dec and the end of jan.

    So sometimes the lights will go out at 11pm (the same day) and sometimes a 1am (the next day!).

    Is there a way to do this with hs.EventSetTimeTrigger(Evref, EvntTime)

    How about having a hs.EventSetDateTrigger(Evref, EvntDate)?
Working...
X