Created
September 1, 2023 02:22
-
-
Save ersin-ertan/9f28836941e7fe47d1d08057f97711d5 to your computer and use it in GitHub Desktop.
Update the light every second
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val pre = """ | |
- type: device.command.ColorAbsolute | |
color: | |
spectrumRGB: """ | |
val post = """ | |
devices: Light strip - myRm | |
- type: time.delay | |
for: 1 sec""" | |
var counter = 194 | |
var secPerDay = 86400; | |
var secPerDay_ = 2; | |
fun main() { | |
repeat(secPerDay_) { index -> | |
print(pre + (counter * index).toString() + post) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment