Here’s the flow for one zone.
[
{
"id": "3e2937d631a8eed8",
"type": "api-call-service",
"z": "829fc44d0881fb9e",
"name": "Garden on",
"server": "753d0826.5edb28",
"version": 3,
"debugenabled": false,
"service_domain": "bhyve",
"service": "start_watering",
"entityId": "",
"data": "{\"entity_id\":\"switch.zone\",\"minutes\":\"{{payload}}\"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 490,
"y": 320,
"wires": [
[]
]
},
{
"id": "9e1681bcc91f21ca",
"type": "api-call-service",
"z": "829fc44d0881fb9e",
"name": "Garden off",
"server": "753d0826.5edb28",
"version": 3,
"debugenabled": false,
"service_domain": "bhyve",
"service": "stop_watering",
"entityId": "",
"data": "{\"entity_id\":\"switch.zone\"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 490,
"y": 380,
"wires": [
[
"0088491da9fa831b"
]
]
},
{
"id": "70eaf8aca5b09667",
"type": "server-state-changed",
"z": "829fc44d0881fb9e",
"name": "Garden zone on",
"server": "753d0826.5edb28",
"version": 3,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "switch.zone",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": true,
"for": 0,
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 100,
"y": 440,
"wires": [
[
"20a29647c5539afe"
],
[
"0088491da9fa831b"
]
]
},
{
"id": "1e1518cc5322bb05",
"type": "api-call-service",
"z": "829fc44d0881fb9e",
"name": "",
"server": "753d0826.5edb28",
"version": 3,
"debugenabled": false,
"service_domain": "timer",
"service": "start",
"entityId": "timer.garden_irrigation",
"data": "{\"duration\":\"00:{{payload}}:00\"}",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 440,
"y": 460,
"wires": [
[]
]
},
{
"id": "0088491da9fa831b",
"type": "api-call-service",
"z": "829fc44d0881fb9e",
"name": "",
"server": "753d0826.5edb28",
"version": 3,
"debugenabled": false,
"service_domain": "timer",
"service": "finish",
"entityId": "timer.garden_irrigation",
"data": "",
"dataType": "json",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 440,
"y": 520,
"wires": [
[
"0e49e0d7fed98609"
]
]
},
{
"id": "3ddcd3c68b32cc37",
"type": "server-state-changed",
"z": "829fc44d0881fb9e",
"name": "",
"server": "753d0826.5edb28",
"version": 3,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_boolean.garden_timer",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": true,
"for": 0,
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 200,
"y": 240,
"wires": [
[
"adfdfc8d123e010c"
],
[
"9e1681bcc91f21ca"
]
]
},
{
"id": "adfdfc8d123e010c",
"type": "api-current-state",
"z": "829fc44d0881fb9e",
"name": "Minutes",
"server": "753d0826.5edb28",
"version": 2,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_select.garden_timer_values",
"state_type": "num",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 300,
"y": 300,
"wires": [
[
"3e2937d631a8eed8"
]
]
},
{
"id": "0e49e0d7fed98609",
"type": "api-call-service",
"z": "829fc44d0881fb9e",
"name": "switch off",
"server": "753d0826.5edb28",
"version": 3,
"debugenabled": false,
"service_domain": "input_boolean",
"service": "turn_off",
"entityId": "input_boolean.garden_timer",
"data": "",
"dataType": "jsonata",
"mergecontext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 520,
"y": 600,
"wires": [
[]
]
},
{
"id": "20a29647c5539afe",
"type": "api-current-state",
"z": "829fc44d0881fb9e",
"name": "Minutes",
"server": "753d0826.5edb28",
"version": 2,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_select.garden_timer_values",
"state_type": "num",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 258,
"y": 380,
"wires": [
[
"1e1518cc5322bb05"
]
]
},
{
"id": "753d0826.5edb28",
"type": "server",
"name": "Home Assistant",
"version": 2,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": 30
}
]