-def pageSetupScenarioB() {
-
- def inputLightsB = [
- name: "B_switches",
- type: "capability.switch",
- title: "Control the following switches...",
- multiple: true,
- required: false
- ]
- def inputDimmersB = [
- name: "B_dimmers",
- type: "capability.switchLevel",
- title: "Dim the following...",
- multiple: true,
- required: false
- ]
-
- def inputTurnOnLuxB = [
- name: "B_turnOnLux",
- type: "number",
- title: "Only run this scenario if lux is below...",
- multiple: false,
- required: false
- ]
-
- def inputLuxSensorsB = [
- name: "B_luxSensors",
- type: "capability.illuminanceMeasurement",
- title: "On these lux sensors",
- multiple: false,
- required: false
- ]
-
- def inputMotionB = [
- name: "B_motion",
- type: "capability.motionSensor",
- title: "Using these motion sensors...",
- multiple: true,
- required: false
- ]
-
- def inputAccelerationB = [
- name: "B_acceleration",
- type: "capability.accelerationSensor",
- title: "Or using these acceleration sensors...",
- multiple: true,
- required: false
- ]
- def inputContactB = [
- name: "B_contact",
- type: "capability.contactSensor",
- title: "Or using these contact sensors...",
- multiple: true,
- required: false
- ]
-
- def inputTriggerOnceB = [
- name: "B_triggerOnce",
- type: "bool",
- title: "Trigger only once per day...",
- defaultValue:false
- ]
-
- def inputSwitchDisableB = [
- name: "B_switchDisable",
- type: "bool",
- title: "Stop triggering if physical switches/dimmers are turned off...",
- defaultValue:false
- ]
-
- def inputLockB = [
- name: "B_lock",
- type: "capability.lock",
- title: "Or using these locks...",
- multiple: true,
- required: false
- ]
-
- def inputModeB = [
- name: "B_mode",
- type: "mode",
- title: "Only during the following modes...",
- multiple: true,
- required: false
- ]
-
- def inputDayB = [
- name: "B_day",
- type: "enum",
- options: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
- title: "Only on certain days of the week...",
- multiple: true,
- required: false
- ]
-
- def inputLevelB = [
- name: "B_level",
- type: "enum",
- options: [[10:"10%"],[20:"20%"],[30:"30%"],[40:"40%"],[50:"50%"],[60:"60%"],[70:"70%"],[80:"80%"],[90:"90%"],[100:"100%"]],
- title: "Set dimmers to this level",
- multiple: false,
- required: false
- ]
-
- def inputTurnOffB = [
- name: "B_turnOff",
- type: "number",
- title: "Turn off this scenario after motion stops or doors close/lock (minutes)...",
- multiple: false,
- required: false
- ]
-
- def inputScenarioNameB = [
- name: "ScenarioNameB",
- type: "text",
- title: "Scenario Name",
- multiple: false,
- required: false,
- defaultValue: empty
- ]
-
- def pageProperties = [
- name: "pageSetupScenarioB",
- ]
-
- return dynamicPage(pageProperties) {
-section("Name your scenario") {
- input inputScenarioNameB
- }
-
-section("Devices included in the scenario") {
- input inputMotionB
- input inputAccelerationB
- input inputContactB
- input inputLockB
- input inputLightsB
- input inputDimmersB
- }
-
-section("Scenario settings") {
- input inputLevelB
- input inputTurnOnLuxB
- input inputLuxSensorsB
- input inputTurnOffB
- }
-
-section("Scenario restrictions") {
- input inputTriggerOnceB
- input inputSwitchDisableB
- href "timeIntervalInputB", title: "Only during a certain time...", description: getTimeLabel(B_timeStart, B_timeEnd), state: greyedOutTime(B_timeStart, B_timeEnd), refreshAfterSelection:true
- input inputDayB
- input inputModeB
- }
-
-section("Help") {
- paragraph helpText()
- }
- }
-}
-
-def pageSetupScenarioC() {
-
- def inputLightsC = [
- name: "C_switches",
- type: "capability.switch",
- title: "Control the following switches...",
- multiple: true,
- required: false
- ]
- def inputDimmersC = [
- name: "C_dimmers",
- type: "capability.switchLevel",
- title: "Dim the following...",
- multiple: true,
- required: false
- ]
-
- def inputMotionC = [
- name: "C_motion",
- type: "capability.motionSensor",
- title: "Using these motion sensors...",
- multiple: true,
- required: false
- ]
-
- def inputAccelerationC = [
- name: "C_acceleration",
- type: "capability.accelerationSensor",
- title: "Or using these acceleration sensors...",
- multiple: true,
- required: false
- ]
- def inputContactC = [
- name: "C_contact",
- type: "capability.contactSensor",
- title: "Or using these contact sensors...",
- multiple: true,
- required: false
- ]
-
- def inputTriggerOnceC = [
- name: "C_triggerOnce",
- type: "bool",
- title: "Trigger only once per day...",
- defaultValue:false
- ]
-
- def inputSwitchDisableC = [
- name: "C_switchDisable",
- type: "bool",
- title: "Stop triggering if physical switches/dimmers are turned off...",
- defaultValue:false
- ]
-
- def inputLockC = [
- name: "C_lock",
- type: "capability.lock",
- title: "Or using these locks...",
- multiple: true,
- required: false
- ]
-
- def inputModeC = [
- name: "C_mode",
- type: "mode",
- title: "Only during the following modes...",
- multiple: true,
- required: false
- ]
-
- def inputDayC = [
- name: "C_day",
- type: "enum",
- options: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
- title: "Only on certain days of the week...",
- multiple: true,
- required: false
- ]
-
- def inputLevelC = [
- name: "C_level",
- type: "enum",
- options: [[10:"10%"],[20:"20%"],[30:"30%"],[40:"40%"],[50:"50%"],[60:"60%"],[70:"70%"],[80:"80%"],[90:"90%"],[100:"100%"]],
- title: "Set dimmers to this level",
- multiple: false,
- required: false
- ]
-
- def inputTurnOffC = [
- name: "C_turnOff",
- type: "number",
- title: "Turn off this scenario after motion stops or doors close/lock (minutes)...",
- multiple: false,
- required: false
- ]
-
- def inputScenarioNameC = [
- name: "ScenarioNameC",
- type: "text",
- title: "Scenario Name",
- multiple: false,
- required: false,
- defaultValue: empty
- ]
-
- def inputTurnOnLuxC = [
- name: "C_turnOnLux",
- type: "number",
- title: "Only run this scenario if lux is below...",
- multiple: false,
- required: false
- ]
-
- def inputLuxSensorsC = [
- name: "C_luxSensors",
- type: "capability.illuminanceMeasurement",
- title: "On these lux sensors",
- multiple: false,
- required: false
- ]
-
- def pageProperties = [
- name: "pageSetupScenarioC",
- ]
-
- return dynamicPage(pageProperties) {
- section("Name your scenario") {
- input inputScenarioNameC
- }
-
-section("Devices included in the scenario") {
- input inputMotionC
- input inputAccelerationC
- input inputContactC
- input inputLockC
- input inputLightsC
- input inputDimmersC
- }
-
-section("Scenario settings") {
- input inputLevelC
- input inputTurnOnLuxC
- input inputLuxSensorsC
- input inputTurnOffC
- }
-
-section("Scenario restrictions") {
- input inputTriggerOnceC
- input inputSwitchDisableC
- href "timeIntervalInputC", title: "Only during a certain time...", description: getTimeLabel(C_timeStart, C_timeEnd), state: greyedOutTime(C_timeStart, C_timeEnd), refreshAfterSelection:true
- input inputDayC
- input inputModeC
- }
-
-section("Help") {
- paragraph helpText()
- }
- }
-}
-
-def pageSetupScenarioD() {
-
- def inputLightsD = [
- name: "D_switches",
- type: "capability.switch",
- title: "Control the following switches...",
- multiple: true,
- required: false
- ]
- def inputDimmersD = [
- name: "D_dimmers",
- type: "capability.switchLevel",
- title: "Dim the following...",
- multiple: true,
- required: false
- ]
-
- def inputMotionD = [
- name: "D_motion",
- type: "capability.motionSensor",
- title: "Using these motion sensors...",
- multiple: true,
- required: false
- ]
-
- def inputAccelerationD = [
- name: "D_acceleration",
- type: "capability.accelerationSensor",
- title: "Or using these acceleration sensors...",
- multiple: true,
- required: false
- ]
- def inputContactD = [
- name: "D_contact",
- type: "capability.contactSensor",
- title: "Or using these contact sensors...",
- multiple: true,
- required: false
- ]
-
- def inputLockD = [
- name: "D_lock",
- type: "capability.lock",
- title: "Or using these locks...",
- multiple: true,
- required: false
- ]
-
- def inputModeD = [
- name: "D_mode",
- type: "mode",
- title: "Only during the following modes...",
- multiple: true,
- required: false
- ]
-
- def inputTriggerOnceD = [
- name: "D_triggerOnce",
- type: "bool",
- title: "Trigger only once per day...",
- defaultValue:false
- ]
-
- def inputSwitchDisableD = [
- name: "D_switchDisable",
- type: "bool",
- title: "Stop triggering if physical switches/dimmers are turned off...",
- defaultValue:false
- ]
-
- def inputDayD = [
- name: "D_day",
- type: "enum",
- options: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
- title: "Only on certain days of the week...",
- multiple: true,
- required: false
- ]
-
-
- def inputLevelD = [
- name: "D_level",
- type: "enum",
- options: [[10:"10%"],[20:"20%"],[30:"30%"],[40:"40%"],[50:"50%"],[60:"60%"],[70:"70%"],[80:"80%"],[90:"90%"],[100:"100%"]],
- title: "Set dimmers to this level",
- multiple: false,
- required: false
- ]
-
- def inputTurnOffD = [
- name: "D_turnOff",
- type: "number",
- title: "Turn off this scenario after motion stops, doors close or close/lock (minutes)...",
- multiple: false,
- required: false
- ]
-
- def inputScenarioNameD = [
- name: "ScenarioNameD",
- type: "text",
- title: "Scenario Name",
- multiple: false,
- required: false,
- defaultValue: empty
- ]
-
- def inputTurnOnLuxD = [
- name: "D_turnOnLux",
- type: "number",
- title: "Only run this scenario if lux is below...",
- multiple: false,
- required: false
- ]
-
- def inputLuxSensorsD = [
- name: "D_luxSensors",
- type: "capability.illuminanceMeasurement",
- title: "On these lux sensors",
- multiple: false,
- required: false
- ]
-
- def pageProperties = [
- name: "pageSetupScenarioD",
- ]
-
- return dynamicPage(pageProperties) {
- section("Name your scenario") {
- input inputScenarioNameD
- }
-
-section("Devices included in the scenario") {
- input inputMotionD
- input inputAccelerationD
- input inputContactD
- input inputLockD
- input inputLightsD
- input inputDimmersD
- }