SprinklerDevice¶
Sprinkler devices generally have some number of sprinkler zones.
Class Properties¶
| Property | Type | Writable | Min API | Description |
|---|---|---|---|---|
activeZone |
integer | No | 1.0 | the 1-based index of the active zone (None=all zones off, 1=zone 1, 2=zone 2, ...). Note this property has undergone changes in name (previously called activeZoneIndex) as well as semantics (previously the index being 0-based). |
zoneCount |
integer | No | 1.0 | the number of zones available for this sprinkler |
zoneEnableList |
list of boolean | No | 1.13 | list of booleans, starting at zone 1 through zone [zoneCount], that specify if a given zone is enabled (has a maximum zone duration > 0). |
zoneNames |
list of string | No | 1.0 | list of zone names, starting at zone 1 through zone [zoneCount]. You must include zoneCount strings in the list. |
zoneMaxDurations |
list of floats | No | 1.0 | list of zone durations in minutes, starting at zone 1 through zone [zoneCount]. You must include zoneCount integers in the list. |
zoneScheduledDurations |
list of floats | No | 1.0 | list of currently active zone durations in minutes if a schedule is running (empty list if no schedule is running), starts at zone 1 through zone [zoneCount] |
pausedScheduleZone |
integer | No | 1.16 | the 1-based index of the paused sprinkler zone index (None=schedule not paused, 1=zone 1 paused, 2=zone 2 paused, ...). |
pausedScheduleRemainingZoneDuration |
float | No | 1.16 | the paused sprinkler zone duration in minutes (None if schedule not paused) |
Device States¶
These are the states provided by this device type and accessible through the dev.states dictionary. They are read-only.
| State ID | Type | Property Name | Notes |
|---|---|---|---|
activeZone |
integer | activeZone |
the number of the active zone, 0 if off (1=zone 1, 2=zone 2, etc) |
activeZone.ui |
string | N/A | the active zone as a human readable string |
zone# |
boolean | N/A | replace the # with the zone number (up to dev.zoneCount) to return whether the zone is running or not |
Commands (indigo.sprinkler.*)¶
Next Zone¶
Set the sprinkler to the next zone, and turn off if it’s the last defined zone.
Command Syntax Examples
indigo.sprinkler.nextZone(123)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
Pause Schedule¶
Pause the current sprinkler schedule but keep it active so it can be resumed.
Command Syntax Examples
indigo.sprinkler.pause(123)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
Previous Zone¶
Set the sprinkler to the previous zone, and turn off if it’s the first defined zone.
Command Syntax Examples
indigo.sprinkler.previousZone(123)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
Resume Schedule¶
Resume the current sprinkler schedule.
Command Syntax Examples
indigo.sprinkler.resume(123)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
Run Schedule¶
Run a sprinkler schedule.
Command Syntax Examples
indigo.sprinkler.run(123, schedule=[10,15,8, 0, 0, 0, 0, 0])
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
schedule |
Yes | list of reals | list of reals representing the number of minutes to run for each zone - the list must have [zoneCount] elements, with 0 for any zone that shouldn’t run |
Stop Schedule¶
Stop the current sprinkler schedule and clear it.
Command Syntax Examples
indigo.sprinkler.stop(123)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
Set Active Zone¶
API v1.12+ only: Turn on a specific zone.
Command Syntax Examples
indigo.sprinkler.setActiveZone(123, index=2)
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| direct parameter | Yes | integer | id or instance of the device |
index |
Yes | integer | 1-based index of the zone to turn on |
Examples