mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-02 22:04:40 +01:00
Compare commits
2 Commits
PROD_2017.
...
MSA-1816-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7052629df5 | ||
|
|
65ae2c0ddf |
@@ -9,7 +9,7 @@ apply plugin: 'smartthings-slack'
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.smartthings.deployment:executable-deployment-scripts:1.0.11"
|
classpath "com.smartthings.deployment:executable-deployment-scripts:1.0.8"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ metadata {
|
|||||||
capability "Tamper Alert"
|
capability "Tamper Alert"
|
||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
capability "Water Sensor"
|
capability "Water Sensor"
|
||||||
capability "Health Check"
|
|
||||||
|
|
||||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x22, 0x85, 0x59, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x9C, 0x31, 0x86", outClusters: ""
|
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x22, 0x85, 0x59, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x9C, 0x31, 0x86", outClusters: ""
|
||||||
}
|
}
|
||||||
@@ -229,8 +228,6 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
|||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
log.debug "Executing 'configure'"
|
log.debug "Executing 'configure'"
|
||||||
// Device-Watch simply pings if no device events received for 8 hrs & 2 minutes
|
|
||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ metadata {
|
|||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Tamper Alert"
|
capability "Tamper Alert"
|
||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
capability "Health Check"
|
|
||||||
|
|
||||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
||||||
}
|
}
|
||||||
@@ -241,8 +240,6 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
|||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
log.debug "Executing 'configure'"
|
log.debug "Executing 'configure'"
|
||||||
// Device-Watch simply pings if no device events received for 8 hrs & 2 minutes
|
|
||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ metadata {
|
|||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Health Check"
|
|
||||||
|
|
||||||
command "resetParams2StDefaults"
|
command "resetParams2StDefaults"
|
||||||
command "listCurrentParams"
|
command "listCurrentParams"
|
||||||
@@ -305,9 +304,6 @@ def lateConfigure(setConf = False) {
|
|||||||
*/
|
*/
|
||||||
def configure() {
|
def configure() {
|
||||||
log.debug "Configuring Device..."
|
log.debug "Configuring Device..."
|
||||||
// Device-Watch simply pings if no device events received for 8 hrs & 2 minutes
|
|
||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
// send associate to group 2 to get alarm data
|
// send associate to group 2 to get alarm data
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
capability "Illuminance Measurement"
|
capability "Illuminance Measurement"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Health Check"
|
|
||||||
|
|
||||||
command "resetParams2StDefaults"
|
command "resetParams2StDefaults"
|
||||||
command "listCurrentParams"
|
command "listCurrentParams"
|
||||||
@@ -126,9 +125,6 @@
|
|||||||
*/
|
*/
|
||||||
def configure() {
|
def configure() {
|
||||||
log.debug "Configuring Device For SmartThings Use"
|
log.debug "Configuring Device For SmartThings Use"
|
||||||
// Device-Watch simply pings if no device events received for 8 hrs & 2 minutes
|
|
||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
// send associate to group 3 to get sensor data reported only to hub
|
// send associate to group 3 to get sensor data reported only to hub
|
||||||
|
|||||||
@@ -81,32 +81,38 @@ def getInputs() {
|
|||||||
//API external Endpoints
|
//API external Endpoints
|
||||||
mappings {
|
mappings {
|
||||||
path("/subscriptionURL/:url") {
|
path("/subscriptionURL/:url") {
|
||||||
action: [
|
action:
|
||||||
|
[
|
||||||
PUT: "updateEndpointURL"
|
PUT: "updateEndpointURL"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
path("/connectionId/:connId") {
|
path("/connectionId/:connId") {
|
||||||
action: [
|
action:
|
||||||
|
[
|
||||||
PUT: "updateConnectionId"
|
PUT: "updateConnectionId"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
path("/devices") {
|
path("/devices") {
|
||||||
action: [
|
action:
|
||||||
|
[
|
||||||
GET: "getDevices"
|
GET: "getDevices"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
path("/devices/:id") {
|
path("/devices/:id") {
|
||||||
action: [
|
action:
|
||||||
|
[
|
||||||
GET: "getDevice"
|
GET: "getDevice"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
path("/update/:id") {
|
path("/update/:id") {
|
||||||
action: [
|
action:
|
||||||
|
[
|
||||||
PUT: "updateDevice"
|
PUT: "updateDevice"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
path("/subscription/:id") {
|
path("/subscription/:id") {
|
||||||
action: [
|
action:
|
||||||
|
[
|
||||||
POST : "registerDeviceChange",
|
POST : "registerDeviceChange",
|
||||||
DELETE: "unregisterDeviceChange"
|
DELETE: "unregisterDeviceChange"
|
||||||
]
|
]
|
||||||
@@ -180,20 +186,16 @@ def eventHandler(evt) {
|
|||||||
def evt_name = evt.name
|
def evt_name = evt.name
|
||||||
def evt_device = evt.device
|
def evt_device = evt.device
|
||||||
def evt_deviceType = getDeviceType(evt_device);
|
def evt_deviceType = getDeviceType(evt_device);
|
||||||
def deviceInfo
|
|
||||||
|
|
||||||
if(evt_deviceType == "thermostat")
|
|
||||||
{
|
|
||||||
deviceInfo = [name: evt_device.displayName, id: evt_device.id, status:evt_device.getStatus(), deviceType:evt_deviceType, manufacturer:evt_device.getManufacturerName(), model:evt_device.getModelName(), attributes: deviceAttributeList(evt_device), locationMode: getLocationModeInfo()]
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
deviceInfo = [name: evt_device.displayName, id: evt_device.id, status:evt_device.getStatus(), deviceType:evt_deviceType, manufacturer:evt_device.getManufacturerName(), model:evt_device.getModelName(), attributes: deviceAttributeList(evt_device)]
|
|
||||||
}
|
|
||||||
|
|
||||||
def params = [
|
def params = [
|
||||||
uri : "${state.endpointURL}/${state.connectionId}",
|
uri : "${state.endpointURL}/${state.connectionId}",
|
||||||
body: [ deviceInfo ]
|
body: [
|
||||||
|
name : evt_device.displayName,
|
||||||
|
id : evt_device.id,
|
||||||
|
deviceType : evt_deviceType,
|
||||||
|
manufacturer: evt_device.getManufacturerName(),
|
||||||
|
model : evt_device.getModelName(),
|
||||||
|
attributes : deviceAttributeList(evt_device)
|
||||||
|
]
|
||||||
]
|
]
|
||||||
try {
|
try {
|
||||||
log.trace "POST URI: ${params.uri}"
|
log.trace "POST URI: ${params.uri}"
|
||||||
@@ -228,13 +230,10 @@ def getDevices() {
|
|||||||
def deviceData = []
|
def deviceData = []
|
||||||
inputs?.each {
|
inputs?.each {
|
||||||
def deviceType = getDeviceType(it)
|
def deviceType = getDeviceType(it)
|
||||||
if(deviceType == "thermostat")
|
if (deviceType == "thermostat") {
|
||||||
{
|
deviceData << [name: it.displayName, id: it.id, deviceType: deviceType, manufacturer: it.getManufacturerName(), model: it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()]
|
||||||
deviceData << [name: it.displayName, id: it.id, status:it.getStatus(), deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()]
|
} else {
|
||||||
}
|
deviceData << [name: it.displayName, id: it.id, deviceType: deviceType, manufacturer: it.getManufacturerName(), model: it.getModelName(), attributes: deviceAttributeList(it)]
|
||||||
else
|
|
||||||
{
|
|
||||||
deviceData << [name: it.displayName, id: it.id, status:it.getStatus(), deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it)]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,13 +246,10 @@ def getDevice() {
|
|||||||
def it = findDevice(params.id)
|
def it = findDevice(params.id)
|
||||||
def deviceType = getDeviceType(it)
|
def deviceType = getDeviceType(it)
|
||||||
def device
|
def device
|
||||||
if(deviceType == "thermostat")
|
if (deviceType == "thermostat") {
|
||||||
{
|
device = [name: it.displayName, id: it.id, deviceType: deviceType, manufacturer: it.getManufacturerName(), model: it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()]
|
||||||
device = [name: it.displayName, id: it.id, status:it.getStatus(), deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it), locationMode: getLocationModeInfo()]
|
} else {
|
||||||
}
|
device = [name: it.displayName, id: it.id, deviceType: deviceType, manufacturer: it.getManufacturerName(), model: it.getModelName(), attributes: deviceAttributeList(it)]
|
||||||
else
|
|
||||||
{
|
|
||||||
device = [name: it.displayName, id: it.id, status:it.getStatus(), deviceType:deviceType, manufacturer:it.getManufacturerName(), model:it.getModelName(), attributes: deviceAttributeList(it)]
|
|
||||||
}
|
}
|
||||||
log.debug "getDevice, return: ${device}"
|
log.debug "getDevice, return: ${device}"
|
||||||
return device
|
return device
|
||||||
@@ -326,28 +322,19 @@ private getLocationModeInfo() {
|
|||||||
//Map each device to a type given it's capabilities
|
//Map each device to a type given it's capabilities
|
||||||
private getDeviceType(device) {
|
private getDeviceType(device) {
|
||||||
def deviceType
|
def deviceType
|
||||||
def capabilities = device.capabilities
|
def caps = device.capabilities
|
||||||
log.debug "capabilities: [${device}, ${capabilities}]"
|
log.debug "capabilities: [${device}, ${caps}]"
|
||||||
log.debug "supported commands: [${device}, ${device.supportedCommands}]"
|
log.debug "supported commands: [${device}, ${device.supportedCommands}]"
|
||||||
|
caps.each {
|
||||||
//Loop through the device capability list to determine the device type.
|
switch (it.name.toLowerCase()) {
|
||||||
capabilities.each {capability ->
|
|
||||||
switch(capability.name.toLowerCase())
|
|
||||||
{
|
|
||||||
case "switch":
|
case "switch":
|
||||||
deviceType = "switch"
|
deviceType = "switch"
|
||||||
|
if (caps.any { it.name.toLowerCase() == "power meter" }) {
|
||||||
//If the device also contains "Switch Level" capability, identify it as a "light" device.
|
|
||||||
if (capabilities.any{it.name.toLowerCase() == "switch level"}){
|
|
||||||
|
|
||||||
//If the device also contains "Power Meter" capability, identify it as a "dimmerSwitch" device.
|
|
||||||
if (capabilities.any{it.name.toLowerCase() == "power meter"}){
|
|
||||||
deviceType = "dimmerSwitch"
|
|
||||||
return deviceType
|
|
||||||
} else {
|
|
||||||
deviceType = "light"
|
|
||||||
return deviceType
|
return deviceType
|
||||||
}
|
}
|
||||||
|
if (caps.any { it.name.toLowerCase() == "switch level" }) {
|
||||||
|
deviceType = "light"
|
||||||
|
return deviceType
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "contact sensor":
|
case "contact sensor":
|
||||||
@@ -427,7 +414,7 @@ private mapDeviceCommands(command, value) {
|
|||||||
resultCommand = "setSaturation"
|
resultCommand = "setSaturation"
|
||||||
resultValue = value
|
resultValue = value
|
||||||
break
|
break
|
||||||
case "colorTemperature":
|
case "ct":
|
||||||
resultCommand = "setColorTemperature"
|
resultCommand = "setColorTemperature"
|
||||||
resultValue = value
|
resultValue = value
|
||||||
break
|
break
|
||||||
@@ -464,8 +451,7 @@ private mapDeviceCommands(command, value) {
|
|||||||
if (value == 1 || value == "1" || value == "lock") {
|
if (value == 1 || value == "1" || value == "lock") {
|
||||||
resultCommand = "lock"
|
resultCommand = "lock"
|
||||||
resultValue = ""
|
resultValue = ""
|
||||||
}
|
} else if (value == 0 || value == "0" || value == "unlock") {
|
||||||
else if (value == 0 || value == "0" || value == "unlock") {
|
|
||||||
resultCommand = "unlock"
|
resultCommand = "unlock"
|
||||||
resultValue = ""
|
resultValue = ""
|
||||||
}
|
}
|
||||||
@@ -476,3 +462,4 @@ private mapDeviceCommands(command, value) {
|
|||||||
|
|
||||||
return [resultCommand, resultValue]
|
return [resultCommand, resultValue]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
159
smartapps/smartthings/flasher-ii.src/flasher-ii.groovy
Normal file
159
smartapps/smartthings/flasher-ii.src/flasher-ii.groovy
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2015 SmartThings
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||||
|
* in compliance with the License. You may obtain a copy of the License at:
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||||
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing permissions and limitations under the License.
|
||||||
|
*
|
||||||
|
* The Flasher
|
||||||
|
*
|
||||||
|
* Author: bob
|
||||||
|
* Date: 2013-02-06
|
||||||
|
*
|
||||||
|
* Modified by Craig Parkin (2017-03-02) to include a time range that events can be triggered in.
|
||||||
|
*/
|
||||||
|
definition(
|
||||||
|
name: "Flasher II",
|
||||||
|
namespace: "smartthings",
|
||||||
|
author: "SmartThings/Craig Parkin",
|
||||||
|
description: "Flashes a set of lights/switch in response to motion, an open/close event, or a switch, during a defined time period.",
|
||||||
|
category: "Convenience",
|
||||||
|
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/light_motion-outlet-contact.png",
|
||||||
|
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/light_motion-outlet-contact@2x.png"
|
||||||
|
)
|
||||||
|
|
||||||
|
preferences {
|
||||||
|
section("When any of the following devices trigger..."){
|
||||||
|
input "motion", "capability.motionSensor", title: "Motion Sensor?", required: false
|
||||||
|
input "contact", "capability.contactSensor", title: "Contact Sensor?", required: false
|
||||||
|
input "acceleration", "capability.accelerationSensor", title: "Acceleration Sensor?", required: false
|
||||||
|
input "mySwitch", "capability.switch", title: "Switch?", required: false
|
||||||
|
input "myPresence", "capability.presenceSensor", title: "Presence Sensor?", required: false
|
||||||
|
}
|
||||||
|
section("Then flash..."){
|
||||||
|
input "switches", "capability.switch", title: "These lights", multiple: true
|
||||||
|
input "numFlashes", "number", title: "This number of times (default 3)", required: false
|
||||||
|
}
|
||||||
|
section("Time settings in milliseconds (optional)..."){
|
||||||
|
input "onFor", "number", title: "On for (default 1000)", required: false
|
||||||
|
input "offFor", "number", title: "Off for (default 1000)", required: false
|
||||||
|
}
|
||||||
|
section("Trigger between what times?") {
|
||||||
|
input "fromTime", "time", title: "From", required: true
|
||||||
|
input "toTime", "time", title: "To", required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def installed() {
|
||||||
|
log.debug "Installed with settings: ${settings}"
|
||||||
|
|
||||||
|
subscribe()
|
||||||
|
}
|
||||||
|
|
||||||
|
def updated() {
|
||||||
|
log.debug "Updated with settings: ${settings}"
|
||||||
|
|
||||||
|
unsubscribe()
|
||||||
|
subscribe()
|
||||||
|
}
|
||||||
|
|
||||||
|
def subscribe() {
|
||||||
|
if (contact) {
|
||||||
|
subscribe(contact, "contact.open", contactOpenHandler)
|
||||||
|
}
|
||||||
|
if (acceleration) {
|
||||||
|
subscribe(acceleration, "acceleration.active", accelerationActiveHandler)
|
||||||
|
}
|
||||||
|
if (motion) {
|
||||||
|
subscribe(motion, "motion.active", motionActiveHandler)
|
||||||
|
}
|
||||||
|
if (mySwitch) {
|
||||||
|
subscribe(mySwitch, "switch.on", switchOnHandler)
|
||||||
|
}
|
||||||
|
if (myPresence) {
|
||||||
|
subscribe(myPresence, "presence", presenceHandler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def motionActiveHandler(evt) {
|
||||||
|
log.debug "motion $evt.value"
|
||||||
|
flashLights()
|
||||||
|
}
|
||||||
|
|
||||||
|
def contactOpenHandler(evt) {
|
||||||
|
log.debug "contact $evt.value"
|
||||||
|
flashLights()
|
||||||
|
}
|
||||||
|
|
||||||
|
def accelerationActiveHandler(evt) {
|
||||||
|
log.debug "acceleration $evt.value"
|
||||||
|
flashLights()
|
||||||
|
}
|
||||||
|
|
||||||
|
def switchOnHandler(evt) {
|
||||||
|
log.debug "switch $evt.value"
|
||||||
|
flashLights()
|
||||||
|
}
|
||||||
|
|
||||||
|
def presenceHandler(evt) {
|
||||||
|
log.debug "presence $evt.value"
|
||||||
|
if (evt.value == "present") {
|
||||||
|
flashLights()
|
||||||
|
} else if (evt.value == "not present") {
|
||||||
|
flashLights()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private flashLights() {
|
||||||
|
|
||||||
|
def between = timeOfDayIsBetween(fromTime, toTime, new Date(), location.timeZone)
|
||||||
|
if (between) {
|
||||||
|
def doFlash = true
|
||||||
|
def onFor = onFor ?: 1000
|
||||||
|
def offFor = offFor ?: 1000
|
||||||
|
def numFlashes = numFlashes ?: 3
|
||||||
|
|
||||||
|
log.debug "LAST ACTIVATED IS: ${state.lastActivated}"
|
||||||
|
if (state.lastActivated) {
|
||||||
|
def elapsed = now() - state.lastActivated
|
||||||
|
def sequenceTime = (numFlashes + 1) * (onFor + offFor)
|
||||||
|
doFlash = elapsed > sequenceTime
|
||||||
|
log.debug "DO FLASH: $doFlash, ELAPSED: $elapsed, LAST ACTIVATED: ${state.lastActivated}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (doFlash) {
|
||||||
|
log.debug "FLASHING $numFlashes times"
|
||||||
|
state.lastActivated = now()
|
||||||
|
log.debug "LAST ACTIVATED SET TO: ${state.lastActivated}"
|
||||||
|
def initialActionOn = switches.collect{it.currentSwitch != "on"}
|
||||||
|
def delay = 0L
|
||||||
|
numFlashes.times {
|
||||||
|
log.trace "Switch on after $delay msec"
|
||||||
|
switches.eachWithIndex {s, i ->
|
||||||
|
if (initialActionOn[i]) {
|
||||||
|
s.on(delay: delay)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s.off(delay:delay)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delay += onFor
|
||||||
|
log.trace "Switch off after $delay msec"
|
||||||
|
switches.eachWithIndex {s, i ->
|
||||||
|
if (initialActionOn[i]) {
|
||||||
|
s.off(delay: delay)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
s.on(delay:delay)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delay += offFor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user