{
  "version": 1,
  "name": "Health guardian starter",
  "description": "Starter health reaction. Re-select the health region and teach your food image.",
  "steps": [
    {
      "id": "read-health",
      "name": "Read health percentage",
      "type": "read_sensor",
      "target": "Health orb",
      "interaction": null,
      "expected": null,
      "max_attempts": 1,
      "delay_ms": 0,
      "timeout_seconds": 2,
      "sensor_kind": "health_percent",
      "variable_name": "health",
      "region_x": 520,
      "region_y": 40,
      "region_width": 48,
      "region_height": 28
    },
    {
      "id": "health-critical",
      "name": "Health below 40 percent",
      "type": "condition",
      "target": "health",
      "interaction": null,
      "expected": null,
      "max_attempts": 1,
      "delay_ms": 0,
      "timeout_seconds": 1,
      "variable_name": "health",
      "comparator": "lt",
      "compare_value": 40,
      "then_steps": [
        {
          "id": "eat-food",
          "name": "Teach food image here",
          "type": "click_object",
          "target": "Food",
          "interaction": "Eat",
          "expected": null,
          "max_attempts": 20,
          "delay_ms": 700,
          "timeout_seconds": 8,
          "button": "left",
          "threshold": 0.82,
          "hover_ms": 100,
          "selection_strategy": "best",
          "cooldown_ms": 1800,
          "priority": 100
        }
      ]
    },
    {
      "id": "repeat-health",
      "name": "Repeat health check",
      "type": "goto",
      "target": "read-health",
      "interaction": null,
      "expected": null,
      "max_attempts": 1,
      "delay_ms": 750,
      "timeout_seconds": 1
    }
  ]
}
