Is there a way to create virtual devices that would have the values of the Sunrise and Sunset times that come from HS3 ?
Announcement
Collapse
No announcement yet.
Sunrise and Sunset Virtual Devices
Collapse
X
-
Try
X = hs.Sunrise
X = hs.Sunset
These return String values
Edit:
You'd need to create an event to run once a day, probably at, or soon after midnight.
The action for this event could be an immediate script.
For instance:
hs.SetDeviceStringByName("SunRiseDevice",hs.SunRise,True)
hs.SetDeviceStringByName("SunSetDevice",hs.SunSet,True)
Or if you want both values included in a single virtual device:
hs.SetDeviceStringByName("SunDevice","SunRise: " & hs.SunRise & " SunSet: " & hs.SunSet,True)
Real courage is not securing your Wi-Fi network.
- Likes 1
-
Originally posted by taylormia View PostI want one device each for Sunrise and Sunset. Do I have to manually create the two virtual devices first before creating the event ?
Thanks.Real courage is not securing your Wi-Fi network.
Comment
Comment